From 0f410c29f7cd01cd353078c09b7a7c1ba8f1a362 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 7 Jan 2025 18:37:57 +0800 Subject: [PATCH] Update login.py --- web/admin/dashboard/login.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/admin/dashboard/login.py b/web/admin/dashboard/login.py index 793ac2efef..a5e5b34478 100644 --- a/web/admin/dashboard/login.py +++ b/web/admin/dashboard/login.py @@ -200,7 +200,7 @@ def do_login(): info = thisdb.getUserByName(username) password = mw.md5(password) - if info['name'] != username or info['password'] != password: + if info is None or info['name'] != username or info['password'] != password: msg = "密码错误,帐号:{1},密码:{2},登录IP:{3}", (('****', '******', request.remote_addr)) if login_cache_limit == None: