Skip to content

P0: approve/reject node actions are GET — email prefetch can auto-approve a destructive action #644

Description

@hellodk

Part of #639. Verified. node_actions.py:541/597 — approve_action and reject_action are @actions_router.get. GET mutating state is CSRF/prefetch-unsafe: mail clients (Gmail/Outlook/iOS) and link-unfurlers prefetch URLs in HTML email → silently approve/reject before the operator reads it. Token entropy is irrelevant to GET-prefetch.

AC

  • approve/reject become POST; the emailed link opens a GET confirmation page that submits a POST.
  • Combine with the approve() TOCTOU fix (SELECT FOR UPDATE / atomic CAS) so concurrent approves can't double-dispatch.

Tests

  • approve via GET → 405; via POST → works; second concurrent POST → no double dispatch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is brokenp0-criticalProduction down / data losssecuritySecurity fix or improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions