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(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields · Issue #1611 · developing-today/code

id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611

New issue
Copy link
New issue
Copy link
Closed
#1703
Closed
id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields#1611
#1703
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours 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

The plain-text (non---json) output of id claim, id doc and id group renders field values raw into a one-line key=value key=value … format, while the values it prints are only validated for byte length and NFC — spaces, tabs and newlines all pass. A tag name or value containing a newline therefore breaks the one-line-per-row contract and can forge an entire extra row (with attacker-chosen subject= / author= / event= fields) in id claim list / search and id doc output; spaces and tabs silently make rows ambiguous for any consumer splitting on whitespace.

Claims in the store are signed events that arrive through the same ingest path sync uses, so the crafted name/value does not have to be typed by the person reading the output.

Evidence (verified this run, main 63ba1705)

  • Rendering: tokens() in pkgs/id/src/commands/group.rs:63-71 joins format!("{key}={}", text(value)) with single spaces, and text() (group.rs:54-60, doc: "strings without quotes, anything else as JSON") returns strings verbatim — no quoting, escaping or sanitisation. All three command families print through it: claims via doc.rs:46,57 (print_action/print_rows, shared with doc), commands/doc.rs:46,57, commands/group.rs:108,268,338.
  • Field order gives the forgery leverage: claim_fields (commands/claim.rs:37-48) prints subject, name, [value], author, event — the value sits before the real author=/event=, so a first-match parser reads the forged ones.
  • Validation admits the payload: check_op/check_text (pkgs/id/src/tag_claims.rs:118-157) check only byte length (name 1..=128, value 0..=512, tag_claims.rs:40,43) and is_nfc. Space, tab, CR and LF are all NFC-stable. documents.rs:105-119 applies the same length+NFC-only check to media_type, which id doc publish/history also prints through tokens().
  • Probe (verbatim check_text + text/tokens + the claim_fields order, run on the laptop; tag_claims.rs sha256 f698d7a6…, commands/group.rs 94bb7f20…, commands/claim.rs 7df730c3… identical on both clones; probe + log in the fleet's hidden_files/probe-2026-10-28-laneA-cliout/):
    • Control value="plans" → passes, one line.
    • value="hello world" and name="my topic" → pass; rendered row contains bare tokens (world, topic) with no key=, so whitespace-splitting consumers misparse.
    • value="x\nsubject=deadbeef name=forged author=deadbeef event=deadbeef" → passes both checks; the single claim renders as 2 lines, the second a fully-formed forged claim row.
    • name="a\nauthor=deadbeef" → passes; renders as 2 lines with a forged author= starting the second line.
    • value="a\tb" → passes; raw tab in the row.

Why it matters

These commands' plain output is the documented machine-adjacent format (commands/claim.rs module doc: "list and search print one line per live claim, subject= name= [value=] author= event=") — the fleet's own scripts and operators read it. A peer-authored claim with a newline value can plant a phantom row naming a different author/event in another node's listing, which is exactly the kind of output forgery the rest of this codebase guards against (cf. the web UI's textContent-only rendering of untrusted names, #1457). The --json form is unaffected (serde escapes correctly), which makes the plain form the odd one out.

Acceptance criteria

  • Plain-text rows from id claim list/search, id doc publish/events/history/frontier and id group output are always one physical line per row, whatever bytes a name, value, media type, group name/description or reason field contains.
  • A whitespace-splitting consumer can recover every field unambiguously: values containing spaces/tabs/newlines are quoted/escaped (or such values are refused at validation with a named error) — the chosen rule is pinned by tests and stated in the commands' module docs.
  • A crafted claim with a newline-bearing name/value (probe cases above) can no longer produce a second line or a duplicate author=/event= token in plain output.
  • --json output is byte-for-byte unchanged, and ordinary space-free values render exactly as today (no gratuitous quoting of the common case, or the change is documented as intentional).
  • Tests pin the rule at the renderer (tokens()/print helpers) and, if refusal is chosen, at check_text/DocumentRef::check as well.

Triage note: quoting/escaping vs refusing control characters is a small contract pin for the queue lane — refusal alone would change what tags peers may set (sync-ingested events already in stores could hold such values), so the renderer-side fix is likely the load-bearing half either way.

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-635

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    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
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours 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-code-a
    • Session / ID: new-issue-creator-code-a cron run, 2026-10-28 01:35 CDT
    • Found via: filed this run
    • Task: Triage the plain-text output forgery: tag names/values (and doc media types) are validated for length+NFC only, so newline/space/tab bytes pass, and the shared tokens() renderer (commands/group.rs:63-71) prints them raw into the one-line key=value format used by id claim/doc/group — a crafted value forges an extra row with duplicate author=/event= fields.
    • Expectation: effort/s — decide quoting/escaping vs validation refusal (renderer-side fix likely load-bearing), pin with tests; --json unchanged.
    • Links: probe + log in the goal's hidden_files/probe-2026-10-28-laneA-cliout/ (verbatim check_text + tokens, run on the laptop)
  4. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    Sibling filed as #1613: the same raw-rendering shape, but for unsigned gossip peer-announcement names printed by id peers / REPL peers (different data, trust boundary, printers, and fix surface). The two fixes should share one escaping convention for CLI plain-text output — #1613's acceptance criteria cross-link back here.

  5. github-actions
    assigned
    dezren39
    on Oct 28, 2026
  6. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    Scope note from the 2026-10-28 lane-A creator run (not a new issue — same data family as this one): id list also prints tag names raw in a TSV row (pkgs/id/src/commands/list.rs:93-95 local-serve path, :118-120 direct-store path, :158-160 remote path — println!("{hash}\t{name}")), and list names can be peer-authored via sync like the claim/doc/group fields here. The triage ruling for this issue (quote/escape vs refuse) should be applied to cmd_list too, or explicitly scoped out. The remote-input sibling for peer-announcement names is #1613; the find/search download-path issue is #1614.

  7. dezren39
    removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 28, 2026
  8. 58 remaining items

  9. dezren39
    added
    status/parkedDeliberately paused with a recorded resume condition
    on Oct 28, 2026
  10. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: queue worker (repo-worker-code), lane C shift
    • Session / ID: queue task 1853
    • Found via: queue claim (resume of awaiting_ci)
    • Task: PR id: quote whitespace/control values in plain-text renderer so rows cannot be forged (#1611) #1703 CI re-check — all 31 named sub-checks PASS (incl. test-unit, cargo-check, clippy, fmt), 0 failures; only the aggregate nix flake check job (122942182176) is still queued with no runner assigned since 2026-10-28T16:14:25Z.
    • Expectation: parked 20 min per CI rule — resume: if the aggregate job is green, merge PR id: quote whitespace/control values in plain-text renderer so rows cannot be forged (#1611) #1703 and complete task 1853 (only tolerated failure = pre-existing id(serve): world_names_are_bounded_and_are_a_single_path_segment test fails on clean main #1709 in a test shard).
    • Links: PR id: quote whitespace/control values in plain-text renderer so rows cannot be forged (#1611) #1703 @ eb562f8
  11. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 28, 2026
  12. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane D shift
    • Session / ID: queue task 1853
    • Found via: queue claim
    • Task: Implement the triage-pinned renderer contract for id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611: quote/escape whitespace/control values in the plain-text renderer (pkgs/id/src/commands/group.rs tokens()/text()) so a row is always one physical line with unambiguous fields; --json unchanged.
    • Expectation: effort s; done = branch + PR opened with renderer tests, CI checked or parked for CI.
    • Links: n/a yet
  13. dezren39
    closed this as completedin #1703on Oct 28, 2026
  14. dezren39
    added a commit that references this issue on Oct 28, 2026

    id: quote whitespace/control values in plain-text renderer so rows ca…

    0e24537
  15. developing-today
    added
    status:done
    on Oct 28, 2026
  16. dezren39 commented on Oct 28, 2026

    @dezren39
    dezren39
    on Oct 28, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane D shift
    • Session / ID: queue task 1853
    • Found via: queue claim (resume — PR already existed from the earlier claim of this task)
    • Task: Fix id(claim/doc/group): plain-text output renders names/values raw — a newline in a tag name or value forges extra rows and duplicate author=/event= fields #1611 renderer quoting per triage task 1717 ruling.
    • Result: PR id: quote whitespace/control values in plain-text renderer so rows cannot be forged (#1611) #1703 merged (squash, merge commit 0e245370). The diff was verified fresh this run: text() in pkgs/id/src/commands/group.rs renders whitespace/control strings as JSON string literals (documented scheme), space-free values byte-identical, --json untouched; 7 new renderer tests cover space/newline-in-value, newline-in-name, tab, forged-row payload, and JSON-unchanged. All CI checks on the PR were SUCCESS (test-unit, shards, clippy, fmt, flake check). Issue closed by the merge.
  17. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 28, 2026
  18. dezren39
    added a commit that references this issue on Oct 28, 2026

    fix(id/peers): escape announced names at the printers so a gossip nam…

    0a5b0ca
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/sSmall: expected under 2 hours 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.