GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(invite): Invite::new has no control-character check at all — a crafted invite name carries newline/tab/CR into the /invite page and the prefilled petname · Issue #1770 · developing-today/code

id(invite): Invite::new has no control-character check at all — a crafted invite name carries newline/tab/CR into the /invite page and the prefilled petname #1770

New issue
Copy link
New issue
Copy link
Closed
#3759
Closed
id(invite): Invite::new has no control-character check at all — a crafted invite name carries newline/tab/CR into the /invite page and the prefilled petname#1770
#3759
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 28, 2026
Issue body actions

Problem

Invite::new is the only name validator in pkgs/id with no control-character refusal at all: an invite name may contain newline, tab and carriage return verbatim. Every sibling validator refuses them — petname::normalize_name and the directory's clean_name both reject char::is_control — but the invite name, which is attacker-chosen inside a link anyone can craft, goes straight to the /invite page.

Evidence (verified this run on main 9874fe59)

  • pkgs/id/src/invite.rs:31-45 — Invite::new validates the name with exactly two checks: non-empty after trim, and chars().count() <= MAX_NAME_CHARS (64). No control, format or whitespace check. Invite::parse / from_query (the link a recipient actually opens) funnel through the same new, and percent-decoding (invite.rs:133-158) happily restores %0A, %09, %0D into the name.
  • Sibling house rule: pkgs/id/src/petname.rs:217-230 — normalize_name ensures !name.chars().any(char::is_control) ("a petname cannot contain control characters"); pkgs/id/src/directory.rs clean_name does the same for account names.
  • Where the unchecked name lands: pkgs/id/src/web/explore.rs:373-390 — invite_page renders it as the page headline (<h1>Add {name}</h1>), the submit button text (Add {name}), and prefills it as the petname input's value. html_escape neutralises markup, not control characters: a newline/tab/CR in the name renders into the page and the form field as-is, and a name the petname layer itself would refuse then fails the recipient's submit with an unexplained validation error. (Category-Cf/bidi characters in invite names are the display side of the same gap; the petname half of that class is already tracked in id(petname): format characters (Cf) bypass both petname guards — U+200B makes a spoof of another contact's name, U+202E passes the 'no control characters' rule #1674 — this issue is the missing Cc check at the invite boundary, which id(petname): format characters (Cf) bypass both petname guards — U+200B makes a spoof of another contact's name, U+202E passes the 'no control characters' rule #1674 does not cover.)

Probe (verbatim mirror, run on the laptop)

Mirror of Invite::new's name checks vs petname::normalize_name's (invite.rs sha256 79c069aa…, petname.rs sha256 ff6cba65…, main 9874fe59). Probe: ~/git/fleet/probe-2026-10-28-laneB-replay-invite/ (laptop), copy + log in the goal bookkeeping hidden_files/probe-2026-10-28-laneB-replay-invite/:

P2 control plain 'Ann Lee':    invite_ok=true  petname_ok=true
P2 newline 'Ann\nLee':         invite_ok=true  petname_ok=false
P2 tab 'Ann\tLee':             invite_ok=true  petname_ok=false
P2 CR 'Ann\rLee':              invite_ok=true  petname_ok=false
P2 bidi U+202E in name:        invite_ok=true  petname_ok=true   (Cf display class, cf. #1674)
P2 zero-width U+200B in name:  invite_ok=true  petname_ok=true   (Cf display class, cf. #1674)
P2 65 chars (over cap):        invite_ok=false petname_ok=false

Why it matters

An invite link is a trust hand-off: the recipient's one confirmation screen says "Add {name}" for a key they cannot humanly verify. The name in that screen is the part a person actually reads, and it is entirely link-author-controlled. Today it can carry raw line breaks and tabs into the page and the prefilled petname field, and it is held to a weaker standard than every other name in the system — including the petname it is about to become, which refuses the same characters one step later.

Acceptance criteria

  • Invite::new refuses a name containing control characters (at minimum Cc: \n, \r, \t), matching the normalize_name / clean_name rule, with the refusal reachable through Invite::parse and from_query as well.
  • Tests in invite.rs: newline, tab and CR names are refused; the existing round-trip, plus-as-space and 65-char refusal tests still pass (laptop or CI).
  • Triage pins whether category-Cf characters are also refused here or left to id(petname): format characters (Cf) bypass both petname guards — U+200B makes a spoof of another contact's name, U+202E passes the 'no control characters' rule #1674's petname-side fix; either way the decision is recorded on this issue.

Activity

Next
  1. developing-today commented on Oct 28, 2026

    @developing-today
    developing-todayBot
    on Oct 28, 2026 – with developing.today
    Contributor
    More actions

    CODE-718

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/xsTrivial: expected under 30 minutes of work
    on Oct 28, 2026
  3. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane B, slug new-issue-creator-code-b)
    • Session / ID: new-issue-creator-code-b run, 2026-10-28 ~18:36Z
    • Found via: filed this run
    • Task: Triage Invite::new's missing control-character refusal — pin adding the sibling is_control rule (petname/directory) to invite-name validation, and whether category-Cf is handled here or left to id(petname): format characters (Cf) bypass both petname guards — U+200B makes a spoof of another contact's name, U+202E passes the 'no control characters' rule #1674.
    • Expectation: effort/xs — done looks like the triage verdict pinned on this issue and a fix packet enqueued (or the fix itself, if triage finds it mechanical).
    • Links: evidence in the issue body; verbatim-mirror probe ~/git/fleet/probe-2026-10-28-laneB-replay-invite/ (laptop)
  4. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  6. 14 remaining items

  7. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 1, 2026
  8. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (resumed from Lane D's park)

    • Agent: queue worker (repo-worker-code), Lane F
    • Session / ID: task 4799 (resumed; implementation by Lane D)
    • Found via: queue claim (park resume)
    • Task: PR fix(id): invite names refuse control and format characters (#1770) #3759 verified and merged: diff read line-by-line against the id(invite): Invite::new has no control-character check at all — a crafted invite name carries newline/tab/CR into the /invite page and the prefilled petname #1770 acceptance (Cc + full Cf refused on the raw name before trimming via the shared is_format_char; direct + percent-encoded tests; ordinary-space trim preserved), Codex review completed with no findings on head 0f31e2b.
    • Verification note: the invite unit tests have still not executed anywhere — the laptop cargo env cannot compile this crate (pre-existing, identical on clean main, per Lane D's park note) and PR CI never started (fleet Actions backlog: main runs queued since 14:45Z). Merged under the standing merge doctrine (PRs do not wait for CI; CI runs on main) — the merge commit's id-check run on main is the executing verification; a red run there is a fix-forward on this issue.
    • Links: PR fix(id): invite names refuse control and format characters (#1770) #3759 · task 4799
  9. dezren39
    added a commit that references this issue on Nov 1, 2026

    Merge pull request #3759 from developing-today/queue/4799-1770-invite…

    51919e9
  10. dezren39
    closed this as completedin #3759on Nov 1, 2026
  11. dezren39
    removed
    work/assignedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/in-progressQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    on Nov 1, 2026
  12. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.