소스 검색

버그 수정

2DU 9 년 전
부모
커밋
2da6d6bf0c
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app.py

+ 2 - 2
app.py

@@ -2911,7 +2911,7 @@ def change():
 def check(name = None, sub = None, number = None):
     curs.execute("select * from user where id = '" + pymysql.escape_string(name) + "'")
     rows = curs.fetchall()
-    if(rows and rows[0]['acl'] == 'owner' or rows[0]['acl'] == 'admin'):
+    if(rows and rows[0]['acl'] == 'owner' or rows and rows[0]['acl'] == 'admin'):
         return '<meta http-equiv="refresh" content="0;url=/error/4" />'
     else:
         if(admincheck() == 1):
@@ -2994,7 +2994,7 @@ def logout():
 def ban(name = None):
     curs.execute("select * from user where id = '" + pymysql.escape_string(name) + "'")
     rows = curs.fetchall()
-    if(rows and rows[0]['acl'] == 'owner' or rows[0]['acl'] == 'admin'):
+    if(rows and rows[0]['acl'] == 'owner' or rows and rows[0]['acl'] == 'admin'):
         return '<meta http-equiv="refresh" content="0;url=/error/4" />'
     else:
         if(request.method == 'POST'):