Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: assert passwords are at most 72 bytes #1013

Merged
merged 9 commits into from
Jan 10, 2025
Merged

fix: assert passwords are at most 72 bytes #1013

merged 9 commits into from
Jan 10, 2025

Conversation

joe-herman
Copy link
Member

@joe-herman joe-herman commented Dec 27, 2024

Summary

  • fix: assert passwords are at most 72 bytes
  • docs: update README with hot protips

Context

Bcrypt truncates passwords after 72 bytes. This PR restricts maximum password length to 72 bytes instead of 72 characters.

In lieu of a full battery of signup tests, this appends on to app-ui/src/app/test/accept-invite.test.tsx and asserts that adding a password that's too long followed by a good password works as intended.

References

@joe-herman joe-herman marked this pull request as draft December 30, 2024 16:34
@joe-herman joe-herman marked this pull request as ready for review December 31, 2024 14:33
@joe-herman joe-herman requested a review from neurosnap January 7, 2025 20:21
@joe-herman joe-herman changed the title fix: validate passwords are at most 72 bytes fix: assert passwords are at most 72 bytes Jan 10, 2025
@joe-herman joe-herman merged commit c67a663 into main Jan 10, 2025
6 checks passed
@joe-herman joe-herman deleted the sc-24975 branch January 10, 2025 16:31
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.

2 participants