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

Typo in /prologue/security/hashers.nim #140

Closed
zr0z opened this issue Nov 10, 2021 · 3 comments · Fixed by #144
Closed

Typo in /prologue/security/hashers.nim #140

zr0z opened this issue Nov 10, 2021 · 3 comments · Fixed by #144

Comments

@zr0z
Copy link
Contributor

zr0z commented Nov 10, 2021

Hi,

There is a typo in the hasher signature for pbkdf2_sha256.

result = fmt"pdkdf2_sha256${salt}${iterations}${output}"

Should be

result = fmt"pbkdf2_sha256${salt}${iterations}${output}"

The algorithm name is also wrong in pbkdf2_sha256verify :

if algorithm != "pdkdf2_sha1":

I can create the PR for the fix but it will be a breaking change for people using this hasher, as pbkdf2_sha256verify would fail for already stored password digests.

On a side note, in the Python world, Passlib and Django are using pbkdf2_sha256${iterations}${salt}${hash}, so I was wondering if it would make sense to provide a compatible implementation, in parallel to the existing one.

I can create the necessary PRs if needed.

@ringabout
Copy link
Member

Hi, thanks for reporting this issue. Since this module is not used internally, maybe we should deprecate this module. Eventually they can be implemented externally.

@ringabout
Copy link
Member

ringabout commented Nov 10, 2021

so I was wondering if it would make sense to provide a compatible implementation, in parallel to the existing one.

If you want to implement it under the planety organization, I can invite you as a member.

@zr0z
Copy link
Contributor Author

zr0z commented Nov 10, 2021

If you want to implement it under the planety organization, I can invite you as a member.

That's a great offer, thank you very much. Let me think about it!

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 a pull request may close this issue.

2 participants