1000-ft view: these examples aren’t “bugs” in a single line — they’re bad designs. We’ll generate predictable reset links, skip re-auth for sensitive actions, accept cross-site settings changes, hand out reusable magic links, and let coupons be reapplied forever.
Why it’s bad: token = email|timestamp (guessable),
no server-side store, no expiry, and can be reused indefinitely.
Why it’s bad: lets a logged-in user change their email without re-entering the current password; session hijack ⇒ account takeover.
Why it’s bad: state-changing POST accepts requests from any origin, no token, no origin/referrer checks.
Why it’s bad: the link never expires and can be used by anyone who has it, forever. No binding to device/IP, no single-use.
Why it’s bad: applies SAVE50 on every click with no
one-time or cap — totals can go negative.