Commit 11542d0
feat(project): increase securityTokenHeader max_length from 20 to 64 (#112483)
## Summary
Increases the `securityTokenHeader` field limit from 20 to 64 characters
in the project settings serializer.
The previous 20-char cap was too restrictive — common header names like
`X-Custom-Security-Header` (26 chars) hit the limit. 64 is a more
practical ceiling that still constrains unbounded input.
## Changes
- `src/sentry/core/endpoints/project_details.py`: `max_length=20` →
`max_length=64` on `securityTokenHeader` field
- `tests/sentry/core/endpoints/test_project_details.py`: adds
`test_security_token_header_max_length` covering:
- exactly 64 chars accepted (boundary)
- 65 chars rejected with 400
Test pattern matches prior art in the same test class (e.g.
`test_sensitive_fields_too_long`, `test_store_crash_reports_exceeded`).
Co-authored-by: junior <junior@sentry.io>1 parent 2d83299 commit 11542d0
File tree
2 files changed
+15
-1
lines changed- src/sentry/core/endpoints
- tests/sentry/core/endpoints
2 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
847 | 861 | | |
848 | 862 | | |
849 | 863 | | |
| |||
0 commit comments