mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-01-29 21:51:31 +00:00
fix: Password reset is only required for AUTH_BACKEND_MODEL
This commit is contained in:
@@ -233,13 +233,17 @@ class AuthMixin:
|
||||
return True
|
||||
return False
|
||||
|
||||
def check_passwd_too_simple(self, password):
|
||||
backend = getattr(self, 'backend', None)
|
||||
@staticmethod
|
||||
def check_passwd_too_simple(password):
|
||||
simple_passwords = ['admin', 'ChangeMe']
|
||||
if backend == settings.AUTH_BACKEND_MODEL and password in simple_passwords:
|
||||
if password in simple_passwords:
|
||||
return True
|
||||
return False
|
||||
|
||||
def is_auth_backend_model(self):
|
||||
backend = getattr(self, 'backend', None)
|
||||
return backend == settings.AUTH_BACKEND_MODEL
|
||||
|
||||
@staticmethod
|
||||
def get_public_key_md5(key):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user