Skip to content

fix: Fixes regression in backend logic for argon2 and bcrypt#29

Open
Daverball wants to merge 1 commit into
notypecheck:mainfrom
seantis:fix/bcrypt-argon2-super-regression
Open

fix: Fixes regression in backend logic for argon2 and bcrypt#29
Daverball wants to merge 1 commit into
notypecheck:mainfrom
seantis:fix/bcrypt-argon2-super-regression

Conversation

@Daverball
Copy link
Copy Markdown

For derived backends like bcrypt_sha256 we were getting incorrect results for the first call to _calc_checksum, since we were starting over the inheritance chain from the top when arriving at _NoBackend, instead of from the spot where _NoBackend previously resided in the chain.

Fixes #27


I would've liked to add test cases, to ensure this doesn't regress again in the future, but there's unfortunately currently no reliable way to reset a handler back to having no backends, so the only way we could feasible test this, without changing the code and potentially introduce more regressions, is with a subprocess, so we can compare the output from a fresh instance of the handler against a fully initialized version. But that would only really work for the default backend, so there's a whole bunch of plumbing in the test cases that would need to change in order to accommodate this. So the cure currently seems worse than the disease, but maybe someone can think of a somewhat reliable way to test this, without causing a whole bunch of extra complication in the test case machinery.

For derived backends like `bcrypt_sha256` we were getting incorrect
results for the first call to `_calc_checksum`, since we were starting
over the inheritance chain from the top when arriving at `_NoBackend`,
instead of from the spot where `_NoBackend` previously resided in the
chain.
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.

bcrypt_sha256 hash then verify fails

1 participant