Skip to content

fix(gateway): allow html media attachments#29592

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:hermes/fix-29582-wechat-html-media
Closed

fix(gateway): allow html media attachments#29592
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:hermes/fix-29582-wechat-html-media

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

Summary

  • include html and htm in the shared MEDIA: attachment allowlist
  • keep .html file exports flowing through the gateway attachment path instead of being silently dropped
  • add regression coverage for MEDIA:/tmp/...html extraction

Testing

  • uv run --frozen pytest -q -o addopts= tests/gateway/test_platform_base.py
  • uv run --frozen ruff check gateway/platforms/base.py tests/gateway/test_platform_base.py
  • git diff --check

Fixes #29582

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists labels May 21, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Near-duplicate of #12702 (same fix: add .html/.htm to allowlist). Also related to #24384 (broader MEDIA regex fix) and #27214 (WhatsApp HTML attachment handling). Fixes #29582.

@teknium1

Copy link
Copy Markdown
Contributor

Superseded by #34844, which consolidates this cluster.

This PR widens the extract_media extension allowlist, which is the right direction — but on its own it leaves the unconditional MEDIA:\s*\S+ strip in place, so a MEDIA: tag with any extension still outside the (now wider) list keeps getting deleted from the body before extract_local_files can pick up the bare path. #34844 fixes both halves: it unifies the two extractors onto a single shared extension set (MEDIA_DELIVERY_EXTS) AND replaces the loose strip with an extension-anchored one, so an unknown-extension path survives in the text instead of vanishing.

Closing as superseded — thanks for surfacing and helping pin down this bug; it was part of getting the full fix right. See #34844.

@teknium1 teknium1 closed this May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: WeChat gateway fails to send .html files due to MEDIA extension allowlist

3 participants