Closed fabrik42 closed 7 years ago
Hi! I just stumbled over a small bug in the PasswordResetController.create/2 function.
PasswordResetController.create/2
At the moment, the function can't handle the use case, where a user enters an email address that can't be found in the database.
The affected code is here: https://github.com/riverrun/openmaize/blob/master/installer/phoenix/templates/phx_html/password_reset_controller.ex#L16
Repo.get_by(User, email: email) will return nil and will cause the User.reset_changeset to throw an error.
Repo.get_by(User, email: email)
nil
User.reset_changeset
I fixed this problem in my local installation and could provide PR with a fix and specs if this is wanted.
Thanks for pointing this out. I'll let you know when I've fixed it - it should be tomorrow some time.
Thank you! Let me know if I can help!
Fixed in the latest version of the installer.
Thank you!
Hi! I just stumbled over a small bug in the
PasswordResetController.create/2
function.At the moment, the function can't handle the use case, where a user enters an email address that can't be found in the database.
The affected code is here: https://github.com/riverrun/openmaize/blob/master/installer/phoenix/templates/phx_html/password_reset_controller.ex#L16
Repo.get_by(User, email: email)
will returnnil
and will cause theUser.reset_changeset
to throw an error.I fixed this problem in my local installation and could provide PR with a fix and specs if this is wanted.