Skip to content

fix(gateway): expand extract_media() extension whitelist for text/code files - #37957

Closed
mehmetkr-31 wants to merge 1 commit into
NousResearch:mainfrom
mehmetkr-31:fix/extract-media-whitelist-extensions
Closed

fix(gateway): expand extract_media() extension whitelist for text/code files#37957
mehmetkr-31 wants to merge 1 commit into
NousResearch:mainfrom
mehmetkr-31:fix/extract-media-whitelist-extensions

Conversation

@mehmetkr-31

Copy link
Copy Markdown
Contributor

MEDIA: tags referencing .markdown, .py, .sh, .sql, and .log files were not whitelisted in the MEDIA_DELIVERY_EXTS tuple. For paths with spaces, the regex fell back to \S+ which truncated at the first space, silently delivering the wrong path.

Add the missing extensions to MEDIA_DELIVERY_EXTS so the space-tolerant alternation branch is used for these common file types.

Adds 3 new tests to TestExtractMedia including space-in-path regression.

…e files

MEDIA: tags referencing .markdown, .py, .sh, .sql, and .log files were not
whitelisted in the MEDIA_DELIVERY_EXTS tuple. For paths with spaces, the regex
fell back to \S+ which truncated at the first space, silently delivering the wrong path.

Add the missing extensions to MEDIA_DELIVERY_EXTS so the space-tolerant
alternation branch is used for these common file types.

Adds 3 new tests to TestExtractMedia including space-in-path regression.
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery labels Jun 3, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Part of the saturated MEDIA: regex whitelist cluster (issue #37318, PR #37395). Canonical approach is dynamic derivation from SUPPORTED_DOCUMENT_TYPES (#29609) rather than extending the static tuple.

@mehmetkr-31 mehmetkr-31 closed this Jun 3, 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 P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants