Repository navigation
Harden query replies, link display text, and terminal file links - #1534
Merged
Merged
Conversation
A reply reaches the PTY's input, where a shell with no reader stages it as a command line. Echo the id only within kitty's own alphabet and a 64-character bound; any other id is dropped and the query still answered. Every other reply carries a parsed color, a number, or a constant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The class shown text and consent dialogs escape, and a Tool definition or a link target refuses, now covers every Unicode format and default-ignorable code point and every separator but U+0020, not a hand-picked list of them. Tag characters take the RegExp u flag, and an escape spells each UTF-16 unit so JSON output still parses back to the same value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A label respelling another host read as a human phrase: a trailing dot, a port, wrapping brackets or punctuation, compatibility forms, invisible characters, or a homoglyph. Compare what the text resolves to, through the URL parser, and do not read a figure, a version, or a file link's own file name as a host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A local file link whose text names its target previews on a click. That text and an empty host are whatever the output printed, so a page that can read files beside it now waits on the dialog a document link's does, asked of the resolved target. A declined question reopens nothing, and a double-click keeps one question. The security overview also states that an upstream Tool grant reaches a nested dormouse.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Report a terminal click through the host-only dispatch option rather than the params a client writes, and name the confirmation helpers for both of their callers. A file link's naming rule is now one predicate, and a run of punctuation in a long label scans once. Push text and pairing labels drop the same invisible characters as the consent dialogs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dormouse-bot
approved these changes
Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dormouse-bot
approved these changes
Nov 3, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 3, 2026
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.
Hardens what terminal output can do through query replies and links, and what invisible characters can hide.
^[A-Za-z0-9_+.-]{1,64}$. Any other id is dropped and the query is still answered. Every other reply, from Dormouse, xterm.js, or ImageAddon, carries only a parsed color, a number, or a constant.S124now states this.classifyDisplayMatchnow compares the host the display text resolves to. It applies NFKC, reads separators as spaces, drops invisible characters, strips wrapping brackets and punctuation, and ignores a root dot or a port. Non-ASCII names go through the URL parser as punycode. Text that names no host (12.5%,v1.2.3) and afile:link whose text names its own path (README.md:42) stay plain.file:links. A click on a link whose text names its target now waits on the same dialog as a document link when the resolved target would run its own script. The check runs on the resolved target, so a symlink can't answer for its name and a user's inert handler skips the question. A declined question opens nothing further, and a double-click keeps one question. The click reaches the handler through a host-only dispatch option, not request params.FORMAT_CHARACTERSnow covers every Unicode format and default-ignorable code point, and every separator but U+0020.boundedPushTextdrops the same invisible characters, which also covers pairing and passkey labels.security.mdnow states that an upstream Tool grant reaches adormouse.ymlnested in a checkout, and that a confirmed terminal link can send a local page's contents off the machine. Thedor-toolrationale no longer assumes output names its own host.Behavior to review:
runcan no longer spell an emoji that needs U+FE0F (U+200D was already refused); a script it calls still can. Paths and arguments are not refused, but consent dialogs anddor toolnow show these characters, and spaces like U+202F in macOS screenshot names, as\uescapes.README.md:42linking to a non-file:target, such as anhttps:permalink orvscode://file/..., is now deceptive, asREADME.mdalready was. It has a copy action but no open action.Testing:
tsc -binlibandtsc --noEmitinstandalonepass.pnpm test, at load average about 90, had one failure: the 300-iterationgroup-droptest timed out at 5s. An earlier run at similar load also failedIframePanelandframe-client. All three files pass when run alone with--testTimeout=120000 --retry=3, and this branch does not touch them.🤖 Generated with Claude Code