Skip to content

fix(wecom): use CreateSafeHTTPClient for media downloads - #3323

Open
SashaMIT wants to merge 1 commit into
sipeed:mainfrom
SashaMIT:fix/wecom-media-safe-http
Open

fix(wecom): use CreateSafeHTTPClient for media downloads#3323
SashaMIT wants to merge 1 commit into
sipeed:mainfrom
SashaMIT:fix/wecom-media-safe-http

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Aug 9, 2026

Copy link
Copy Markdown

Summary

  • WeCom built mediaClient as a plain http.Client, so inbound storeRemoteMedia and outbound downloadRemoteMediaToTemp followed redirects onto loopback / private hosts.
  • Construct the client with utils.CreateSafeHTTPClient and ValidateSafeHTTPURL before fetch.
  • Sibling of fix(channels): block private targets on inbound media downloads #3322 (QQ/Telegram/Discord/LINE/Slack DownloadFile private block); WeCom uses a separate media client path.

Test plan

  • go test ./pkg/channels/wecom/ -count=1 (includes new redirect-to-private reject)
  • CI

Made with Cursor

WeCom mediaClient was a plain http.Client, so inbound storeRemoteMedia
and outbound downloadRemoteMediaToTemp followed redirects onto
loopback/private hosts. Build the client via CreateSafeHTTPClient and
ValidateSafeHTTPURL before fetch (sibling of channel DownloadFile sipeed#3322).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant