Repository navigation
fix(auth): cap new-password inputs at 72 bytes and install dev extras - #529
Open
vidit-admin wants to merge 2 commits into
Open
vidit-admin wants to merge 2 commits into
vidit-admin wants to merge 2 commits into
Conversation
Password forms (settings, register, reset) set maxLength from a new PASSWORD_MAX_BYTES mirror and check the UTF-8 byte count before submit. NewPassword drops max_length so an over-long ASCII password gets the byte-limit message instead of the generic Pydantic one. make install runs uv sync --all-extras so pytest is present. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: vidit-admin <admin@vidit.app>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: vidit-admin <admin@vidit.app>
This branch has not been 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.
Summary
maxLengthfrom a newPASSWORD_MAX_BYTESconstant inlib/auth.tsand check the UTF-8 byte count before submit, so multibyte input gets a plain message instead of a 422.schemas/auth.NewPassworddropsmax_length: an over-long ASCII password now gets the byte-limit message (password_too_long) instead of Pydantic's generic "String should have at most 72 characters". New backend test covers it.PASSWORD_MAX_BYTESis registered as a hand-kept mirror indocs/engineering.md, with a pointer comment on each side.make installrunsuv sync --all-extras(CI adds--frozen), so pytest is installed andmake testruns on a fresh machine. README troubleshooting line updated.maxLengthcounts UTF-16 units, which never outnumber UTF-8 bytes, so it never blocks a valid password; the byte check covers the rest.Test plan
make test: 1699 passednpm run lint(0 errors),npx tsc --noEmit,npm test(900 passed),make hygiene: clean🤖 Generated with Claude Code