Implement password policy with hook
Ref #4401
Also, please rebase.
💡
@lippserd What do you think about this:
ChangePasswordForm already has the old and new password. So PasswordPolicy can take both.
It would cost us nothing, but admins could implement #5417 by themselves. They could also use e.g Levenshtein distance and/or A.I to prevent the "smartest" users from using passwords similar to their current ones.
💡
@lippserd What do you think about this:
ChangePasswordForm already has the old and new password. So PasswordPolicy can take both.
It would cost us nothing, but admins could implement #5417 by themselves. They could also use e.g Levenshtein distance and/or A.I to prevent the "smartest" users from using passwords similar to their current ones.
That's a good idea! @JolienTrog Could you please adjust the implementation so that the validation function accepts both $newPassword and $oldPassword, where the latter may be null?