Commit 4e0ca52
Validate loopback proxy hosts as IP literals
The loopback-only proxy guard should not treat arbitrary DNS names that start with 127. as loopback. Validate hostnames with node:net isIP before accepting the 127.0.0.0/8 range, while continuing to support localhost and IPv6 loopback.\n\nValidation: npm run check; npm test -- src/lib/icons.test.ts src/lib/stores/starred.test.ts; npm run build; npm ci --dry-run; git diff --check; verified proxy rewrites 127.0.0.1 but preserves LAN, foreign, empty, and 127.example.test-style origins.
Generated with Codex
Co-authored-by: Codex <noreply@openai.com>1 parent 0758b0d commit 4e0ca52
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
0 commit comments