Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Raise ValueError if password is longer than 72 bytes #1000

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

paketb0te
Copy link

See discussion in #969

Moved some existing test cases (that ensured bytes after the 72th were truncated) to a separate fixture and wrote new tests to assert an exception is raised.

test_2a_wraparound_bug is failing with this change, I have to better understand what exactly this is doing and if/how it should be updated.

@paketb0te
Copy link
Author

paketb0te commented Mar 11, 2025

test_2a_wraparound_bug was introduced in #81 (which closes #80, which has a link to THIS - which proposes to set an upper limit on the key_len (which I assume is used internally for the hashing algorithm?), in addition to truncating the key.

My understanding is that this test becomes obsolete if we reject longer passwords in the first place -> not sure if I should delete it, or update it to match the new behavior 🤔

@reaperhulk any preference?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant