fix(output): upstream-derived text never reaches the terminal raw (PHARN-17) - #211
Merged
Merged
Conversation
…ARN-17)
Extractor errors interpolated raw entry names and typeflag bytes, which
reportFatal printed to stderr (fake "OK", line erase, OSC 52), and the
unknown-capability list let Unicode format characters (U+202E) through.
- tar-extract refuses an entry path holding a C0/C1 or \p{Cf} character,
judged first, and renders names/typeflags safely in its messages
- new lib/terminal-safe.ts: the one display sanitizer, now also used by
unknown-capabilities
- logError (the fatal sink) strips the same set, keeping \n and \t
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TvcuVhk8hTeDskp5pAJhnc
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Problem
unsupported type '2': …/n^[[2K^M^[[32mOK.reportFatalthen printed them to stderr, which allows a faked "OK", a line erase, or an OSC 52 clipboard write.Fix
\p{Cf}character. This check runs before any other entry rule. Refusal messages show the name sanitized, and an unprintable typeflag is shown as its code (0x1b). Ordinary non-ASCII names still extract.lib/terminal-safe.ts: the one shared display sanitizer.unknown-capabilities.tsnow uses it.logError(the fatal sink shared by every fatal path) strips the same set of characters but keeps\nand\t.Tests
terminal-safe.test.tscovers the sanitizer.Advisory
THREAT-MODEL.md§2 should list the new extractor refusal. That file is write-protected, so a maintainer has to add it.🤖 Generated with Claude Code
https://claude.ai/code/session_01TvcuVhk8hTeDskp5pAJhnc
Generated by Claude Code