fix(stega): add mux video machine fields to default filter denylist#1190
Open
kmelve wants to merge 1 commit into
Open
fix(stega): add mux video machine fields to default filter denylist#1190kmelve wants to merge 1 commit into
kmelve wants to merge 1 commit into
Conversation
Add 13 machine-generated fields to the stega filterDefault denylist to prevent encoding invisible characters into values that break rendering and logic: - aspect_ratio/aspectRatio: breaks CSS aspect-ratio calculations - blurHash/thumbHash: machine-generated image placeholder hashes - encoding_tier, master_access, max_resolution_tier, max_stored_resolution, mp4_support, resolution_tier, upload_id, video_quality, video_resolution: Mux video API fields None of these are user-editable content, so filtering them has zero impact on visual editing functionality. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Member
Author
|
I'm not sure if this is the best approach to be honest. But Mux is the main way to use Video through Sanity and not escaping these fields made problems for our preview. I wish there was a way to declare "machine fields" from the backend through CSM. |
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
filterDefaultdenylist to prevent stega encoding from breaking rendering and logic in Mux video integrations and image placeholdersaspect_ratio,aspectRatio,blurHash,thumbHash,encoding_tier,master_access,max_resolution_tier,max_stored_resolution,mp4_support,resolution_tier,upload_id,video_quality,video_resolutionContext
The Mux video plugin (
sanity-plugin-mux-input) stores machine-generated fields from the Mux API verbatim inmux.videoAssetdocuments. When stega-encoded, these fields break downstream consumers — most criticallyaspect_ratio/aspectRatiowhich corrupts CSSaspect-ratiocalculations, and various enum/config fields used in conditional logic.Similarly,
blurHashandthumbHashare machine-generated image placeholder hashes (analogous to the already-denylistedlqip) that break when stega characters are injected.Test plan
🤖 Generated with Claude Code