Hash web panel passwords with Argon2id#775
Merged
Merged
Conversation
- Add `IPasswordHasher` and Argon2id implementation - Hash passwords on create/update instead of storing plaintext - Passwords are no longer trimmed - Verify logins against stored hashes - Rehash credentials when cost parameters change - Migrate existing plaintext credentials to hashes on startup - Seed config default user with a hashed password - Verify failed logins against a dummy hash to keep timing constant - Stop exposing/editing stored passwords in the credentials UI panel - Adds some tests for the hasher
ArchangelWTF
requested changes
Jun 15, 2026
ArchangelWTF
left a comment
Member
There was a problem hiding this comment.
Have some concerns about the current package used, would love to ideally just implement ourselves since it doesn't seem too bad
Contributor
Author
|
I chose Scott's package because it uses libsodium, which uses the official C implementation compiled directly from the original Argon2 authors. If you'd rather the pure sharp implementation I can take a look later this afternoon. I'm good either way. They're both tested implementations. |
Member
|
Oh I got no problems with using libsodium, the only issue I have with pulling in Scott's package is that it's only about ~100ish lines that we could just write ourselves and save the trouble of potentially having a package go unmaintained. |
ArchangelWTF
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IPasswordHasherand Argon2id implementation