Skip to content

Conversation

@kirillrdy
Copy link

@kirillrdy kirillrdy commented Nov 23, 2025

The test 'test_long_password' in 'BasicTestCase' was failing due to bcrypt's strict 72-byte limit for passwords when used with bcrypt 5+. This commit truncates the password used in the check_password_hash call to 72 bytes, aligning the test with bcrypt's behavior of ignoring bytes beyond that limit, and preventing ValueError.

Update test_bcrypt.py

Co-authored-by: dotlambda <[email protected]>
@cjwatson
Copy link

cjwatson commented Dec 3, 2025

FWIW I think bcrypt 4.2.0 is fine - the problem arises with bcrypt >= 5.0.0.

@kirillrdy kirillrdy changed the title Fix: test_long_password for bcrypt 4.2.0+ strict limit Fix: test_long_password for bcrypt 5+ strict limit Dec 3, 2025
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.

3 participants