Skip to content

portal: stale Retire/Delete confirmation can mutate a different patch after name reuse #339

Closed

Description

@allisonmahmood

Problem

An unchanged confirmation opened for patch A can retire or delete patch B after A is normally renamed and its former name reused. Both patches belong to the same owner throughout. This is a stale product identity bug, not an access-control finding.

Reproduction

  1. Publish A as monthly-report. Open its Retire or Delete confirmation and leave the tab open.
  2. Republish A under archived-report.
  3. Publish a distinct B under the now-reusable monthly-report name.
  4. Submit the untouched old confirmation. For Delete, type the name that original page displayed.
  5. The POST returns 303 and retires/deletes B. A stays live.

Observed with real GET/POST handlers, Patches services and disposable PostgreSQL:

Retire: original A=live, replacement B=retired, HTTP 303
Delete: original A=live, replacement B=deleted, HTTP 303

The independent reviewer parsed the actual form action and all hidden fields, then ran eight controls:

  • Unchanged A: confirmation correctly mutates A, 303.
  • Rename without reuse: old URL refuses, 404.
  • Same ID with changed lifecycle state: refuses, 409.
  • Rename plus reuse: stale form mutates B, 303.

The Delete case also observed B's scheduled purgeAt. No forged fields, manual database edits or race timing are required. The test uses normal publication and same-owner actions.

Cause and smallest change

The POST resolves the current patch by mutable name. Rendered forms carry lifecycle expectations but no stable patch ID. A new live patch satisfies the old form's state/name checks.

Bind the rendered form to its patch ID. Require that expected ID on submission, refuse a changed name-to-ID binding, and pass only the validated stable ID to the existing mutation. Keep actor/state/dependant checks. Broad routing changes are not necessary.

The product says identity is the patch ID and stale acts should do nothing. The current behavior can take the wrong tool offline and begin its deletion recovery period; it is not a claim that historical content is immediately erased.

Audited at ef3e790. Found and independently reproduced by separate GPT-6 Astra agents in Oh My Pi. Ordinary local product workflows only, with synthetic data and no live services.

Activity

  1. added
    bug
    needs-triage
    area:server
    area:ui
    on Sep 20, 2026
  2. added a commit that references this issue on Sep 24, 2026
    ba95850
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

    area:serverarea:uibugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions