Opus finding
Action parameter silently coerced — typo in `action` query returns success page claiming the wrong operation
lowapi-contracthigh
- apps/web/app/api/opt-in/route.ts:34-36
Any value other than the exact string "disable" (including typos like "Disable", "disabled", or "diasble") is silently treated as enable. A user clicking a copy/edit of the disable link with a typo will be told the operation succeeded as enable, opposite of intent. The token itself is the same; only the action query distinguishes flow.
Recommendation
Either reject unrecognized action values with a 400, or canonicalize via case-insensitive comparison and enumerate accepted values.