GeezerVison is showing github.com — id(world/signed): sign_move never checks world_id or input against the acceptance domain — a move for a blank world, or with an empty input, signs Ok yet no world can ever accept it · Issue #6447 · developing-today/code
id(world/signed): sign_move never checks world_id or input against the acceptance domain — a move for a blank world, or with an empty input, signs Ok yet no world can ever accept it #6447Descriptionid(world/signed): sign_move never checks world_id or input against the acceptance domain — a move for a blank world, or with an empty input, signs Ok yet no world can ever accept it
Summary
crate::world::signed::sign_move (pkgs/id/src/world/signed.rs:67) is the player-side signing entry point for world moves (#2814): the player signs each move with their own key before submitting it, and the world verifies at the input seam. It forwards world_id and input to chain::sign after no domain check of its own — chain::sign validates only the extension shape and the seq/backlink pairing. Two values that the acceptance side refuses unconditionally therefore sign Ok:
- A blank
world_id ("", " ", " ", "\t"). WorldCore::new_with_clock refuses any world whose ID is empty once trimmed — ensure!(!world_id.trim().is_empty(), "world ID must not be empty") (pkgs/id/src/world/core.rs:291) — so no world can ever bear a blank ID. sign_move hashes whatever string it is given into the signed extension's group (world_group, signed.rs:53), producing a well-formed, signature-valid move for a world that cannot exist.
- An empty
input. sign_move signs it Ok, but the resulting header carries no payload hash at all (payload_hash: None — an empty body is no body to the header builder), so MoveChain::verify's commitment check (payload_hash == Some(Hash::digest(input)), signed.rs:154) refuses the move with the misleading reason "signed move does not commit to the submitted input bytes" — the signature is genuine; the move is simply uncommittable. And the production path never gets that far: WorldCore::prepare_input_signed (core.rs:1925) refuses empty input before verify — ensure!(!input.is_empty(), "world input must not be empty") (core.rs:1938; the unsigned prepare_input has the same rule at core.rs:2042).
In both cases signing succeeds silently and the failure only surfaces later, detached from the mistake — the same dead-on-arrival pattern as #6422 / #6424 / #6434 / #6441 / #6443 in sibling sign_* entry points. For the blank world the gap is widest: MoveChain::verify (signed.rs:154) happily verifies the move against the same blank ID, so the refusal lives only in WorldCore's constructor, which the signing side never consults.
Evidence (main @ 9e20032, laptop probe with the real id crate)
Probe: laptop worktree ~/git/fleet/probe-sign-move-wt at origin/main 9e20032, integration test pkgs/id/tests/probe_sign_move.rs (real crate, cargo test --test probe_sign_move):
- Acceptance-side oracles:
WorldCore::new("", WorldLimits::default()) errs; WorldCore::new(" ", …) errs; WorldCore::new("ttt", …) is Ok.
- Control:
sign_move(key, "ttt", 0, None, b"cell-0") signs Ok and MoveChain::verify accepts it.
- Blank worlds:
sign_move returns Ok for "", " ", " ", "\t", and MoveChain::verify against the same ID also returns Ok for each — a move that verifies in isolation yet can never be accepted by any WorldCore.
- Empty input:
sign_move(key, "ttt", 0, None, b"") returns Ok with header.payload_hash = None; MoveChain::verify(…, b"", …) returns Err("signed move does not commit to the submitted input bytes") — and prepare_input_signed would refuse the empty input at core.rs:1938 before verify in any case. Probe test result: 1 passed.
Code reads (origin/main 9e20032):
pkgs/id/src/world/signed.rs:67-91 — sign_move builds ChainExt { kind: MOVE_KIND, group: Some(world_group(world_id)), … } and calls chain::sign with Some(input); no check on world_id or input.
pkgs/id/src/world/core.rs:291 — the world-ID domain rule at construction.
pkgs/id/src/world/core.rs:1934-1949 — prepare_input_signed checks input.len() <= limits.input_bytes and !input.is_empty() before chain.verify(signed_move, &self.world_id, input, &author).
Out of scope, deliberately: input length is per-world (limits.input_bytes, default 16 KiB) and sign_move cannot know the target world's limit, so no length claim is made here; seq/backlink consistency is already refused by chain::sign.
Why it matters
Signed moves are the evidence base for match attestation (#2814, #3792): a witness replays both players' signed move logs. A signing API that mints signature-valid moves outside the acceptance domain pushes a preventable, deterministic failure to the worst place — submission/replay time, where it reads as a broken move rather than a caller bug at the signing call. Every sibling sign_* surface in pkgs/id that has been audited for this pattern now refuses at sign time (artifact #5623 symmetry, currency #6422, attestation #6424/#6441, match_audit #6434, directory_auth #6443); sign_move is the remaining one whose acceptance domain is stated in the same crate and ignored.
Acceptance criteria
sign_move refuses a world_id that is empty or whitespace-only, matching the WorldCore construction rule (core.rs:291), with an error that names the rule; it refuses an empty input, matching prepare_input_signed / prepare_input (core.rs:1938 / :2042).
- Pinning tests cover at least:
"", " " and "\t" world IDs refused; empty input refused; the control move ("ttt", b"cell-0") still signs and passes MoveChain::verify; existing seq/backlink refusals from chain::sign unchanged.
- Triage decides whether
MoveChain::verify should also refuse the same values (defense in depth for the witness-replay path, id: persist signed-move bindings/frontiers in the world journal + ingest signed moves into the event store (#2814 follow-up) #4346) — the sign-side refusal is the minimum fix.
cargo test -p id --lib world (or the world test module's filter) passes on the laptop / in CI.
Related: #2814 (signed move capture), #3792 / #4346 (attestation + signed-move ingest), #5711 (the same "names no world can bear" pattern on the serve side). Sibling sign-domain issues: #6422, #6424, #6434, #6441, #6443. Activitydeveloping-today commented on Nov 6, 2026 added kind/bugSomething isn't working (prefixed form of the classic bug label) task/triageQueue packet kind: verify, reproduce, and route this item app/idPackage/app: id (pkgs/ or apps/ in this repo) on Nov 6, 2026dezren39 commented on Nov 6, 2026 🤖 Agent note · filed
- Agent: new-issue-creator job (new-issue-creator-code-b)
- Session / ID: cron new-issue-creator-code-b, run 2026-11-05 23:20 CST
- Found via: filed this run
- Task: Filed this issue: sign_move in pkgs/id/src/world/signed.rs signs moves for blank world IDs and with an empty input that no world can ever accept; verified this run with a laptop probe against the real id crate at origin/main 9e20032 (probe ~/git/fleet/probe-sign-move-wt, 1 passed).
- Expectation: effort s — triage decides the error shape (sign_move returns chain::ChainError) and whether MoveChain::verify also refuses; sign-side refusal is the minimum fix in the acceptance criteria.
- Links: probe ~/git/fleet/probe-sign-move-wt (pkgs/id/tests/probe_sign_move.rs); siblings id(currency): sign_authorisation never calls validate — a signed authorisation naming another issuer or with rate_den = 0 is dead on arrival, and signing succeeds silently #6422, id(attestation): sign_genesis / sign_claim never check the signer is a player — a non-player's signed genesis or claim is dead on arrival, and signing succeeds silently #6424, id(match_audit): sign_header/sign_footer never check version, roster, signer or seed commitment — signatures verify_integrity always rejects are produced silently #6434, id(attestation): sign_claim never checks the outcome is in compute_state's domain — 'banana', '', 'DRAW' or an uppercase/truncated winner hex signs Ok and is ignored in every view #6441, id(directory_auth): sign_request never checks the nonce against verify_signed's domain — empty, over-long and bad-character nonces sign Ok yet are always rejected as 'signature does not verify' #6443
dezren39 commented on Nov 6, 2026 🤖 Agent note · handed off
dezren39 commented on Nov 11, 2026
🤖 Agent note · picked up — task 10899 (issue #6447)
dezren39 commented on Nov 11, 2026
🤖 Agent note · done (fixed_merged) — task 10899 (issue #6447)
dezren39 commented on Nov 11, 2026
🤖 Agent note · done (already_done)
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|