Skip to content

Harden handling of untrusted message content - #1

Merged
KimNorgaard merged 1 commit into
mainfrom
worktree-synchronous-jumping-raccoon
Oct 3, 2026
Merged

KimNorgaard merged 1 commit into
mainfrom
worktree-synchronous-jumping-raccoon

Conversation

@KimNorgaard

Copy link
Copy Markdown
Contributor

Strip C0 and C1 control characters from message text, card fields and desktop notifications, and drop C1 controls from the whole frame, so other people's messages can't inject terminal escape sequences. Card HTML entities unescape one at a time so � can't produce a raw ESC.

Only http and https links in cards become clickable, matching openURL.

safeName strips leading dots so an attachment can't land as a dotfile, /save creates ~/Downloads instead of falling back to the home directory, and /open downloads into the user cache dir instead of a shared /tmp directory.

Strip C0 and C1 control characters from message text, card fields and
desktop notifications, and drop C1 controls from the whole frame, so
other people's messages can't inject terminal escape sequences. Card
HTML entities unescape one at a time so  can't produce a raw ESC.

Only http and https links in cards become clickable, matching openURL.

safeName strips leading dots so an attachment can't land as a dotfile,
/save creates ~/Downloads instead of falling back to the home directory,
and /open downloads into the user cache dir instead of a shared /tmp
directory.
@KimNorgaard
KimNorgaard merged commit 2a4917e into main Oct 3, 2026
1 check passed
@KimNorgaard
KimNorgaard deleted the worktree-synchronous-jumping-raccoon branch October 3, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant