Skip to content

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

Closed

Description

@dezren39

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)

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

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    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
    MemberAuthor

    🤖 Agent note · filed

  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 1, 2026
  5. 14 remaining items

  6. 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
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 1, 2026
  7. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

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

  8. added a commit that references this issue on Nov 1, 2026
  9. removed
    work/assignedQueue worker lifecycle state
    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
    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

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