Skip to content

server: a mirrored secret's authority is not rechecked between typing the text and sending Enter #900

Closed

Description

@devswha

Split from #589: main already captures the pty identity and a role generation with the sender's claim when a secret is accepted, and rechecks them after the live-screen read (#624, on top of #588's claim recheck).

Remaining

  • On a mirrored pane, the secret handler in server/index.ts (the attachment.mirror branch) does not recheck the sender's authority between paneSendText(secret) and paneSendKeys(["Enter"]). A sender that detaches and rejoins a still-alive attachment while the text RPC is pending still gets its Enter sent, and the answer is ok: true. This was found in the pre-release Codex review of v0.4.0..6993563 and confirmed by reading the code; it has not been reproduced with a test.
  • Withholding Enter alone is not enough. It would leave the secret typed in the prompt for whoever presses Enter next.
  • Suggested fix:
    • Carry one captured authority (claim, pty identity, role generation) through the whole send.
    • If any part of it changes after the text is sent, clear the line instead of leaving the secret in it, and answer with the matching error.
  • Add a contract case for this window in server/submit.contract.test.ts, next to the existing detach/rejoin case.

Related: #566, #576, #588, #589, #624.

Activity

  1. added a commit that references this issue on Oct 14, 2026
    d87173d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions