Commit 7148456
committed
fix(discord): add allowRfc2544BenchmarkRange to attachment and sticker downloads
Discord attachment and sticker downloads fail when the host uses a local
proxy with virtual-IP DNS mode (198.18.0.0/15, RFC 2544 benchmark range).
The SSRF guard blocks these addresses by default.
This follows the same pattern already applied in the Telegram module
(src/telegram/bot/delivery.ts:43) by passing ssrfPolicy with
allowRfc2544BenchmarkRange: true to fetchRemoteMedia calls.
Only Discord-specific call sites are modified to keep the fix scoped:
- appendResolvedMediaFromAttachments (voice messages, images, files)
- appendResolvedMediaFromStickers
Updated corresponding test assertions to expect the new ssrfPolicy parameter.
Fixes #25215
Related: #25086, #24973, #244541 parent 56b8c69 commit 7148456
2 files changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
| |||
236 | 238 | | |
237 | 239 | | |
238 | 240 | | |
| 241 | + | |
239 | 242 | | |
240 | 243 | | |
241 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
| |||
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| 324 | + | |
323 | 325 | | |
324 | 326 | | |
325 | 327 | | |
| |||
0 commit comments