mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-18 00:08:31 +00:00
fix: Handle exceptions in leak password check
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user