Skip to content

fix: add cache subdirectories to MEDIA delivery safe roots - #33901

Closed
zhanglingfei112 wants to merge 1 commit into
NousResearch:mainfrom
zhanglingfei112:fix/media-delivery-cache-roots
Closed

fix: add cache subdirectories to MEDIA delivery safe roots#33901
zhanglingfei112 wants to merge 1 commit into
NousResearch:mainfrom
zhanglingfei112:fix/media-delivery-cache-roots

Conversation

@zhanglingfei112

Copy link
Copy Markdown

save_b64_image() writes to cache/images/ but MEDIA_DELIVERY_SAFE_ROOTS only had image_cache. Add the five standard cache subdirs so MEDIA: tags pointing to valid generated files are not rejected.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists labels May 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #31764 — same fix adding canonical cache subdirectories to MEDIA_DELIVERY_SAFE_ROOTS. Also competes with #33238, #33550. Fixes #31733.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for this — the fix is correct, but it's already on main. The top-level ~/.hermes/cache/images (and sibling cache/*) roots were added to MEDIA_DELIVERY_SAFE_ROOTS in #34485, so the original symptom in #31733 is resolved.

The issue was then reopened for a narrower case your PR doesn't cover: profile-scoped gateways with a symlinked HERMES_HOME (e.g. /opt/data/root/.hermes with $HOME not under /root), where the model emits profiles/<name>/cache/images/... paths. That's being fixed in #54060 (per-profile cache roots added to the allowlist).

Closing as already-implemented. Appreciate the contribution.

@teknium1 teknium1 closed this Jun 28, 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 duplicate This issue or pull request already exists 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.

3 participants