Skip to content

fix(schemas): check secret name length after trimming - #32

Merged
MugdhoAI merged 1 commit into
mainfrom
fix-secret-name-length-after-trim
Nov 14, 2026
Merged

MugdhoAI merged 1 commit into
mainfrom
fix-secret-name-length-after-trim

Conversation

@MugdhoAI

Copy link
Copy Markdown
Owner

Secret names are trimmed before storage, but the 120 character limit was checked on the untrimmed input. A name with surrounding spaces whose trimmed form is exactly 120 characters was rejected, even though the stored value would have been within the limit. This change strips the name in a before validator for both SecretCreate and SecretUpdate so length is checked on the value that will actually be stored, while names over the limit after trimming are still rejected. A regression test covers both cases for both schemas.

Local test evidence: full pytest suite run locally with a SQLite test database, 38 passed (37 after the previous change plus 1 new test).

@MugdhoAI
MugdhoAI merged commit 5649dde into main Nov 14, 2026
4 checks passed
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.

1 participant