Commit 5b44cc6
Trim trailing dot and normalize case for trusted IMDS hostnames
DNS resolvers may return hostnames with a trailing dot (e.g.
`metadata.google.internal.`), which is a valid FQDN form. The previous
direct equality check failed to match these, so they would not be
skipped and could cause false-positive stored-SSRF blocks.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 4af94ea commit 5b44cc6
2 files changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
0 commit comments