mirror of https://github.com/jumpserver/jumpserver
fix: Handle exceptions in leak password check
parent
ad56845d89
commit
c9f281e8f7
|
@ -302,5 +302,9 @@ class AuthMixin:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def check_leak_password(password):
|
def check_leak_password(password):
|
||||||
|
try:
|
||||||
is_exist = LeakPasswords.objects.using('sqlite').filter(password=password).exists()
|
is_exist = LeakPasswords.objects.using('sqlite').filter(password=password).exists()
|
||||||
return is_exist
|
return is_exist
|
||||||
|
except Exception:
|
||||||
|
logger.warning("check leak password failed")
|
||||||
|
return False
|
||||||
|
|
Loading…
Reference in New Issue