jeremyevans / rodauth

Ruby's Most Advanced Authentication Framework
http://rodauth.jeremyevans.net
MIT License
1.69k stars 95 forks source link

Return error status when unverified account exists on account creation #178

Closed janko closed 2 years ago

janko commented 2 years ago

In #177 I missed another place in verify_account where error status should be set, which is when an unverified account exists when attempting to create an account.

I've switched to using #set_response_error_reason_status, as that's used in most other places. I've also added a test for the lockout feature that asserts that a 4xx response status is set when showing the lockout page.

jeremyevans commented 2 years ago

Thanks for the patch. This also looks good. I agree that setting the error reason is the way to go in this case.