Repository navigation
Security 03: Validate auth input & de-enumerate signup (M1/M2/M3) - #10
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- email is now EmailStr, normalized to lowercase/trimmed on both signup and login so casing can't create duplicate accounts or bypass the per-account rate limit. - signup password constrained to 12..72 chars (72 = bcrypt truncation limit); login keeps no length constraint so existing passwords still verify. - signup no longer returns "Email already registered"; it returns a generic message and always hashes, so neither wording nor timing confirms an account exists. Addresses audit findings M1 (password validation) and M2/M3 (email validation + signup enumeration). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bryanshao07
force-pushed
the
security/03-input-validation
branch
from
July 28, 2026 07:40
a16d7ec to
756d820
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Security fix 03 — Auth input validation & signup de-enumeration
Audit findings: M1 (password validation), M2/M3 (email validation + signup enumeration)
EmailStr, normalized to lowercase/trimmed on both signup and login, so casing can't create duplicate accounts or bypass the per-account rate limit.New:
backend/tests/test_auth_validation.py.Stacked on
security/02-rate-limiting(sharesrouters/auth.py). GitHub will retarget this tomainonce #2 merges. Do not merge yet — for review.