From 19ac477a8c288885e386fdb909f91a97dc2c8042 Mon Sep 17 00:00:00 2001 From: jimmy-sketch Date: Thu, 24 Jul 2025 13:41:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E6=8E=88=E6=9D=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/auth.py b/app/auth.py index 7bebdd5..244940f 100644 --- a/app/auth.py +++ b/app/auth.py @@ -84,7 +84,7 @@ def authenticate_user_legacy(db: Session, name: str, password: str) -> Optional[ return None # 3. 验证密码 - if not (user.pw_bcrypt is None and user.pw_bcrypt != ""): + if user.pw_bcrypt is None or str(user.pw_bcrypt) == "": # 修改条件判断逻辑 return None # 4. 检查缓存