The signature of check_hash(password: &str, hash: &str) -> eyre::Result<bool> is a footgun #25

Open
opened 2025-10-16 10:50:08 +00:00 by reivilibre · 0 comments
Owner

pub fn check_hash(password: &str, hash: &str) -> eyre::Result<bool> {

Better to have an ugly error variant and Ok(()), where Ok ALWAYS means successful check.

https://git.emunest.net/reivilibre/idcoop/src/commit/e7a889c41088f61f6f93f11e864c701c50531748/src/passwords.rs#L43 Better to have an ugly error variant and `Ok(())`, where `Ok` ALWAYS means successful check.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: reivilibre/idcoop#25
No description provided.