Commit 8b1f333
harden(ssrf): fail safe if http.DefaultTransport was globally replaced
vprotocol axis 2.4: ssrfGuardedTransport ran at startup with an unchecked
http.DefaultTransport.(*http.Transport) assertion. A third-party package
that swaps the global for a custom RoundTripper would panic odek at boot.
Use a checked assertion with a fresh-transport fallback.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 77812e4 commit 8b1f333
1 file changed
Lines changed: 13 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
89 | 98 | | |
90 | 99 | | |
91 | 100 | | |
0 commit comments