Skip to content

Fix #124: Add max-length validation to bypass bcrypt's silent 72-byte truncation#278

Open
rexx010 wants to merge 1 commit into
Txio-labs:mainfrom
rexx010:docs/124-bcrypt-truncation-comment
Open

Fix #124: Add max-length validation to bypass bcrypt's silent 72-byte truncation#278
rexx010 wants to merge 1 commit into
Txio-labs:mainfrom
rexx010:docs/124-bcrypt-truncation-comment

Conversation

@rexx010

@rexx010 rexx010 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Closes #124

Heads up — this issue was reopened by the Grantfox bot after it
reassigned #124 to me, since its workflow expects an associated
PR before a reassigned issue can be marked resolved.

The underlying fix (password DTO max = 72 validation) was already
merged in a prior PR — see lines 9, 17, 41, 54 of
backend/api/src/dtos/request.rs, plus the regression tests in
password_length_tests (lines 73–139).

Nothing was changed, i just added comments on the fixes i made in the
last PR so that i'll be able to open a PR and close the issue

Add a short explanatory comment above the max = 72 length
validator on each password-carrying field so the constraint's
origin (bcrypt's hard input limit) is clear at a glance.

- RegisterUserRequest.password
- LoginRequest.password
- ResetPasswordWithOTPRequest.new_password
- UpdatePasswordRequest.new_password

Ref Txio-labs#124
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

@rexx010 is attempting to deploy a commit to the oladimejivictor611-5012's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Passwords silently truncated at 72 bytes by bcrypt — no max-length validation

1 participant