Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couch_passwords:verify should always return false for bad inputs #4910

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

rnewson
Copy link
Member

@rnewson rnewson commented Dec 12, 2023

Parts of the codebase depend on being able to pass in nil as the expected hash (e.g, if the user doesn't exist).

In commit 21c2dec I enhanced couch_passwords:verify/2 to use OTP 25's new crypto:hash_equals/2 function, but foolishly omitted the final fallback clause of our original verify/2 function. This PR restores it.

@rnewson rnewson force-pushed the couch_passwords_very_return_false branch from c7f8d69 to 353856a Compare December 12, 2023 12:27
@rnewson rnewson force-pushed the couch_passwords_very_return_false branch from 353856a to 876fa87 Compare December 12, 2023 13:13
@rnewson rnewson merged commit e551cac into main Dec 12, 2023
15 checks passed
@rnewson rnewson deleted the couch_passwords_very_return_false branch December 12, 2023 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants