fix(security): anchor MIME sanitization regex and block fullwidth bypass (#9791, #9795)#10257
Closed
nu-gui wants to merge 1 commit into
Closed
fix(security): anchor MIME sanitization regex and block fullwidth bypass (#9791, #9795)#10257nu-gui wants to merge 1 commit into
nu-gui wants to merge 1 commit into
Conversation
This was referenced Feb 6, 2026
bfc1ccb to
f92900f
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
Contributor
|
Closing as AI-assisted stale-fix triage. Linked issue #9791 ("[Security] Fullwidth character markers bypass sanitization") is currently closed and was closed on 2026-02-15T05:06:14Z with state reason completed. If this specific implementation is still needed on current main, please reopen #10257 (or open a new focused fix PR) and reference #9791 for fast re-triage. |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$to reject trailing content after a valid type/subtype pairaudio/mpeg)normalizeMimeType()insrc/media/input-files.tsFixes #9791, #9795
Test plan
sanitizeMimeType()covering: standard types, fullwidth Unicode, trailing content, invalid valuesnormalizeMimeType()covering: charset stripping, fullwidth Unicode normalizationpnpm checkpasses (0 warnings, 0 errors)Greptile Overview
Greptile Summary
src/media-understanding/apply.tsto NFKC-normalize before validation and anchors the regex to reject trailing content.sanitizeMimeType()and adds targeted Vitest coverage for standard types, whitespace/lowercasing, fullwidth Unicode normalization, and trailing-content rejection.normalizeMimeType()insrc/media/input-files.tsto also apply NFKC normalization, with tests covering parameter/charset stripping and fullwidth normalization.<file ...>blocks.Confidence Score: 5/5