ubccr / mokey

FreeIPA self-service account management portal
BSD 3-Clause "New" or "Revised" License
189 stars 45 forks source link

Verify nsaccountlock before sending password reset email #60

Closed cmd-ntrf closed 3 years ago

cmd-ntrf commented 3 years ago

If the user account is disabled, changing the password is not possible and if the user tries to reset its password he will get a fatal error message and Mokey logs the following message:

timestamp level=error msg="failed to set user password in FreeIPA" error="ipa: change password failed. Unknown status" uid=username

This patches verify nsaccountlock before sending the email, and notify the user his account is disabled is nsaccountlock is true while not sending any email.

aebruno commented 3 years ago

Looks good. Thanks!