mirror of
https://github.com/Luchexx/wacrm.git
synced 2026-11-02 09:19:51 +00:00
`ensureImageHeaderHandle` fetched the caller-supplied `header_media_url` server-side with no validation, so a template submit — an action any authenticated member can perform — could reach loopback, RFC1918 and cloud-metadata addresses, with the response status and content-type echoed back through the thrown error. Wire in the project's existing `isDeliverableUrl` guard, which the two other outbound-fetch call sites (webhook delivery, automation `send_webhook`) already use, and reuse their `redirect: 'manual'` + timeout so a public URL can't 3xx-bounce to an internal one. The rejection reuses the unreachable-host message verbatim so the failure doesn't distinguish "blocked" from "down". Addresses GHSA-6fr5-pxw7-r3xw. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| app | ||
| components | ||
| hooks | ||
| i18n | ||
| lib | ||
| types | ||
| middleware.test.ts | ||
| middleware.ts | ||