taiga-back
taiga-back copied to clipboard
Password validation consistency
instead of only a length validation, call django password validators to have consistency in the password strenght policy
Hi,
This works fine with plugin django-password-validators, but you should consider to to pass the user information to be able to create or use validators requiring user informations (i.e. dont use 5 last passwords..).
In file staiga-back/taiga/users/api.py, line 219, replace
try:
validate_password(password)
except ValidationError as e:
raise exc.WrongArguments(_(str(e.error_list)))
by
try:
validate_password(password, request.user)
except ValidationError as e:
raise exc.WrongArguments(_(str(e.error_list)))
Thanks ;)