comment test_random_password with a TODO to add a new test for checking if some characters are in unhashed password before user creation with random password

This commit is contained in:
rdzantoine.pro@gmail.com
2025-06-23 10:04:32 +02:00
committed by Antoine Nguyen
parent 3c9cc5a42e
commit 8965e7ea78
-3
View File
@@ -305,16 +305,13 @@ def make_password():
for possible_chars in possible_chars_types:
all_possible_chars += possible_chars
certain_chars += random.SystemRandom().choice(possible_chars)
password = "".join(
random.SystemRandom().choice(all_possible_chars) \
for _ in range(length - len(possible_chars_types))
) + certain_chars
li_password = list(password)
random.shuffle(li_password)
password = "".join(li_password)
try:
password_validation.validate_password(password)
except ValidationError: