mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-03 16:35:10 +00:00
fix: 修改SECURITY_PASSWORD_MIN_LENGTH
This commit is contained in:
@@ -322,7 +322,7 @@ def check_password_rules(password, user):
|
|||||||
if user.is_org_admin:
|
if user.is_org_admin:
|
||||||
min_length = settings.SECURITY_ADMIN_USER_PASSWORD_MIN_LENGTH
|
min_length = settings.SECURITY_ADMIN_USER_PASSWORD_MIN_LENGTH
|
||||||
else:
|
else:
|
||||||
min_length = settings.SECURITY_PASSWORD_MIN_LEN
|
min_length = settings.SECURITY_PASSWORD_MIN_LENGTH
|
||||||
pattern += '.{' + str(min_length-1) + ',}$'
|
pattern += '.{' + str(min_length-1) + ',}$'
|
||||||
match_obj = re.match(pattern, password)
|
match_obj = re.match(pattern, password)
|
||||||
return bool(match_obj)
|
return bool(match_obj)
|
||||||
|
Reference in New Issue
Block a user