Skip to content

Commit f463786

Browse files
committed
fix: PASSWORD_REGEX
1 parent dd63b85 commit f463786

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/users/serializers/user.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@
3535
from django.utils.translation import get_language
3636

3737
PASSWORD_REGEX = re.compile(
38-
r"^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z_!@#$%^&*`~.()-+=]+$)"
39-
r"(?![a-z0-9]+$)(?![a-z_!@#$%^&*`~()-+=]+$)(?![0-9_!@#$%^&*`~()-+=]+$)"
40-
r"(?=.*[_!@#$%^&*`~.()-+=])"
38+
r"^(?=.*[a-z])(?=.*[_!@#$%^&*`~.()-+=])"
39+
r"(?:(?=.*[A-Z])|(?=.*\d))"
4140
r"[a-zA-Z0-9_!@#$%^&*`~.()-+=]{6,20}$"
4241
)
4342

43+
4444
version, get_key = Cache_Version.SYSTEM.value
4545

4646

0 commit comments

Comments
 (0)