Repository navigation
Description
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
- Publish A as monthly-report. Open its Retire or Delete confirmation and leave the tab open.
- Republish A under archived-report.
- Publish a distinct B under the now-reusable monthly-report name.
- Submit the untouched old confirmation. For Delete, type the name that original page displayed.
- 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
fix(portal): an old retire or delete form no longer hits a patch that…