Commit 5093645
fix: use $uri for backslash open redirect check (#2357)
## Summary
- The previous `$request_uri` check doesn't work in production because
CloudFront decodes `%5C` to literal `\` before forwarding to nginx, so
`$request_uri` never contains `%5C`
- Switches to `$uri` which nginx always decodes internally (`%5C` →
`\`), regardless of CDN behavior
- Verified with `curl` against the live site: `/%5Ctest` returns 404
(not 400), confirming CloudFront strips the encoding before it reaches
nginx
Fixes apify/apify-core#26551
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ba47ab9 commit 5093645
2 files changed
Lines changed: 7 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | 96 | | |
99 | 97 | | |
100 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
27 | 26 | | |
28 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
0 commit comments