fix: Handle exceptions in leak password check

pull/15361/head
wangruidong 2025-05-08 11:09:18 +08:00 committed by 老广
parent ad56845d89
commit c9f281e8f7
1 changed files with 6 additions and 2 deletions

View File

@ -302,5 +302,9 @@ class AuthMixin:
@staticmethod
def check_leak_password(password):
is_exist = LeakPasswords.objects.using('sqlite').filter(password=password).exists()
return is_exist
try:
is_exist = LeakPasswords.objects.using('sqlite').filter(password=password).exists()
return is_exist
except Exception:
logger.warning("check leak password failed")
return False