错误登录判断

This commit is contained in:
Mr Chen 2025-01-07 18:37:24 +08:00
parent e6c7bc1544
commit b451a6da25
1 changed files with 2 additions and 1 deletions

View File

@ -200,7 +200,8 @@ def do_login():
info = thisdb.getUserByName(username)
password = mw.md5(password)
if info['name'] != username or info['password'] != password:
# print(info)
if info is None or info['name'] != username or info['password'] != password:
msg = "<a style='color: red'>密码错误</a>,帐号:{1},密码:{2},登录IP:{3}", (('****', '******', request.remote_addr))
if login_cache_limit == None: