mirror of https://github.com/jumpserver/jumpserver
perf: 优化校验密码规则 特殊字符校验
parent
6955fc1734
commit
9d0da64ea1
|
@ -95,7 +95,7 @@ def check_password_rules(password, is_org_admin=False):
|
|||
if settings.SECURITY_PASSWORD_NUMBER:
|
||||
pattern += '(?=.*\d)'
|
||||
if settings.SECURITY_PASSWORD_SPECIAL_CHAR:
|
||||
pattern += '(?=.*[`~!@#\$%\^&\*\(\)-=_\+\[\]\{\}\|;:\'\",\.<>\/\?])'
|
||||
pattern += '(?=.*[`~!@#$%^&*()\-=_+\[\]{}|;:\'",.<>/?])'
|
||||
pattern += '[a-zA-Z\d`~!@#\$%\^&\*\(\)-=_\+\[\]\{\}\|;:\'\",\.<>\/\?]'
|
||||
if is_org_admin:
|
||||
min_length = settings.SECURITY_ADMIN_USER_PASSWORD_MIN_LENGTH
|
||||
|
|
Loading…
Reference in New Issue