Escape forbidden controls in generated inline scripts - #7
Draft
falloutmule wants to merge 5 commits into
Draft
Conversation
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.
Purpose
Fix the disagreement where SFHS packing could emit raw forbidden C0/C1 characters inside generated inline JavaScript that the exact verifier correctly rejects.
Root cause
Bundled Pixi code contains raw U+0080 inside JavaScript. The old producer preserved it in the HTML script body; the strict HTML scanner then correctly reported
control-character-in-input-stream.Fix
</scriptsequence, where rewriting would alter.rawsemantics.Security boundary
Regression coverage
Focused builder, packer, and verifier tests cover raw U+0000, U+001F, U+007F, U+0080, U+009F, permitted tab/LF/CR, U+00A0, UTF-8 decoding, JavaScript strings, regular expressions, tagged templates, comments/scanner boundaries, HTML/CSS rejection, escaped representation, script termination, semantic execution, and deterministic output.
Skyline validation (external fixture; not included in this PR)
The preserved Skyline intake reproduces the original failure at
SFHS_SCAN_HTML_PARSE_ERROR/html:1818609. With this repair, canonical pack and exact verify pass:dist/index.htmle35c894a4a4b6ddeaa5bf06816c62fc8c3cbeb34c2bd5735a30b0883abc88f08skyline-drop-1835440be550Skyline browser boot remains BLOCKED by its unrelated legacy cross-file global namespace assumption (
ReferenceError: Direction is not defined). That source migration is intentionally out of scope.Verification
pnpm check— 220 passed, 2 skippedpnpm plugin-validatepnpm hermes-adapter-validatepnpm determinism— deterministic SHA-2564487a0b1d1aec53625ebff9706312f90d734fee9e55fb2a7aa7de8288d0367b2pnpm browser-smokepnpm browser-scenariosSafety
Draft PR only. No merge, release, or deployment is authorized.