-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
Change saltLen to unit8 and add some tests #2117
Conversation
Fixes gopasspw#2116 RELEASE_NOTES=n/a Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure we have the proper tests for saltLen
as well?
RELEASE_NOTES=[BUGFIX] Fix template func arg order Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
It does seem like it was wrong already, but then isn't that really a breaking change that could change the resulting hashes for people? |
Do you mean "breaking change" in the context of semver? The previously generated hashes were just invalid. They would use a random salt of length 32 (depending on the function) and either an empty string or the requested salt length as the password. I don't know why this did never occur to anyone. Maybe nobody is using this? I certainly did use it before, but not sure when. If I have some time I might bisect to find the breaking change. But not right now. |
Yeah, I meant "breaking" as in "this could lead to different hashes now that we have patched". My guess is that it's dating from when we stopped using fixed size salts to use this saltLen function instead last year in that commit. |
Wow, good find. Yes, indeed. That must be it. I don't think I have used the feature since then. Leaves the question how useful it is. |
@dominikschulz Wow, seems this just broke our CI on master 😱 https://github.com/gopasspw/gopass/runs/4851609036?check_suite_focus=true |
Why would that fail after the tests ran successfully on the PR? 🤔 |
I just ran it twice locally and it failed once and worked once... |
|
So it's a flaky test. Hmm, I didn't expect that. Need to take a look later. #2121 |
* Change saltLen to unit8 and add some tests Fixes gopasspw#2116 RELEASE_NOTES=n/a Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org> * Fix arguemnt order for the template funcs and add tests RELEASE_NOTES=[BUGFIX] Fix template func arg order Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Fixes #2116
RELEASE_NOTES=n/a
Signed-off-by: Dominik Schulz dominik.schulz@gauner.org