Commit 75192ba
feat(integrations): Restrict webhook headers to Authorization and X-*
Narrow the custom webhook header allow list to only the Authorization
header and X-* custom headers. Previously User-Agent, Accept, Date, and
Prefer were also permitted; these are removed so callers can only set an
auth credential and their own namespaced custom headers.
The X-* allowance is unchanged (it is a separate prefix check), and the
reserved-header guards still take precedence, so headers like
X-Forwarded-* and X-Sentry-* remain blocked.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 069446e commit 75192ba
2 files changed
Lines changed: 8 additions & 17 deletions
File tree
- src/sentry/sentry_apps/api/parsers
- tests/sentry/sentry_apps/api/endpoints
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
| 259 | + | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
Lines changed: 3 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
752 | 752 | | |
753 | 753 | | |
754 | 754 | | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
| 755 | + | |
759 | 756 | | |
760 | 757 | | |
761 | 758 | | |
762 | 759 | | |
763 | 760 | | |
764 | 761 | | |
765 | 762 | | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
| 763 | + | |
770 | 764 | | |
771 | 765 | | |
772 | 766 | | |
773 | 767 | | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
| 768 | + | |
778 | 769 | | |
779 | 770 | | |
780 | 771 | | |
| |||
0 commit comments