Prevent bcrypt
from raising a ValueError
and log
#19078
Open
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.
Fixes #19063
bcrypt 5.0.0 raises a
ValueError
when a password's length is >72 bytes: pyca/bcrypt#1000 Whereas before it would silently truncate instead.This truncation is fine, as a password of length 72 is sufficiently long that it will still take millions of years to brute force. The pepper being cut off as well is also fine - its designed to add bytes to short passwords.
We may want to think about transitioning away from bcrypt in future (to scrypt or argon2id), but for now this returns to existing behaviour without needing to downgrade
bcrypt
.Question: should we backport this to a 1.140.1?
Pull Request Checklist
EventStore
toEventWorkerStore
.".code blocks
.