diff options
| author | Adam Soltys <[email protected]> | 2026-03-13 23:16:11 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-13 23:16:11 -0700 |
| commit | a57046f80f8c85438ecf9549b94dc88146a976db (patch) | |
| tree | 1ca19c95eb9220897b52cb7034425c39416c6dd0 /src/routes | |
| parent | 738eda87005232f3661a57daca3625d073a5c4aa (diff) | |
| download | coinos-ui-a57046f80f8c85438ecf9549b94dc88146a976db.tar.gz coinos-ui-a57046f80f8c85438ecf9549b94dc88146a976db.zip | |
fix: use 303 redirects in parse.ts and send layout to prevent POST forwarding
The parse function is called from both load functions (GET) and form
actions (POST). When called from an action, 307 redirects preserve the
POST method, causing the original form body to reach unrelated action
handlers in the redirect chain (e.g., send/invoice action receiving the
/send textarea body instead of payment data).
Changed all redirects in parse.ts and the send/bitcoin layout from 307
to 303, which converts POST to GET on redirect, preventing these
spurious action invocations.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/(app)/send/bitcoin/[address]/+layout.server.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts b/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts index e69956dc..8c46b7b9 100644 --- a/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts +++ b/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts @@ -21,7 +21,7 @@ export async function load({ cookies, params, parent }) { // Vault account — stay on /send/bitcoin for on-chain send } else { // Custodial account — send internally via the original invoice - if (invoice.uid !== user.id) redirect(307, `/send/invoice/${invoice.id}`); + if (invoice.uid !== user.id) redirect(303, `/send/invoice/${invoice.id}`); } } |
