From 3acbb1e0fe44928a20e3311a747d8f2f72f873a4 Mon Sep 17 00:00:00 2001 From: kpt <2817151932@qq.com> Date: Wed, 3 Jul 2024 18:42:41 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90user.py=E3=80=91=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BA=86=E5=AF=86=E7=A0=81=E5=80=BC=E8=BF=94=E5=9B=9E=E7=9A=84?= =?UTF-8?q?=E6=98=AF=E5=87=BD=E6=95=B0=E7=9A=84=20Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/user/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/user/user.py b/views/user/user.py index 79f60bd..0884bbb 100644 --- a/views/user/user.py +++ b/views/user/user.py @@ -21,7 +21,7 @@ def login(): hash_with_salt = hashlib.sha256('XiaoXueQi2024'.encode('utf-8')) hash_with_salt.update(request.form['password'].encode('utf-8')) return request.form[ - 'username'] in user and hash_with_salt.hexdigest in user + 'username'] in user and hash_with_salt.hexdigest() in user users = query('select * from user', [], 'select') login_success = list(filter(filter_fn, users))