fix(csp): allow the logout and checkout redirects in form-action #343

Sammanfogat
supernaut sammanfogade 1 incheckning från fix/csp-form-action-redirects in i main 2026-10-10 20:40:18 +00:00
Ägare

What

CSP form-action allows https://id.bitborg.se, https://id.stg.bitborg.se and https://*.mollie.com besides 'self'.

Why

Browsers apply form-action to the redirect that follows a form POST.

  • Sign-out: POST /auth/logout answered 302 to the Bitborg ID end-session endpoint, but the browser never followed it. Seen on staging: no request to id.stg and no LOGOUT event in Keycloak. The next page load signed the person straight back in through SSO, so sign-out looked like a page refresh.
  • Checkout: POST /api/checkout answers 303 to Mollie, which the same rule blocks.

Verification

pnpm check, lint, test and build pass. The built CSP carries the new form-action. A browser check on staging follows the deploy.

## What CSP `form-action` allows `https://id.bitborg.se`, `https://id.stg.bitborg.se` and `https://*.mollie.com` besides `'self'`. ## Why Browsers apply `form-action` to the redirect that follows a form POST. - Sign-out: `POST /auth/logout` answered 302 to the Bitborg ID end-session endpoint, but the browser never followed it. Seen on staging: no request to `id.stg` and no `LOGOUT` event in Keycloak. The next page load signed the person straight back in through SSO, so sign-out looked like a page refresh. - Checkout: `POST /api/checkout` answers 303 to Mollie, which the same rule blocks. ## Verification `pnpm check`, `lint`, `test` and `build` pass. The built CSP carries the new `form-action`. A browser check on staging follows the deploy.
supernaut lade till 1 incheckning 2026-10-10 20:34:26 +00:00
fix(csp): allow the logout and checkout redirects in form-action
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m51s
65dbf8b7f9
Browsers apply form-action to the redirect after a form POST. With only
'self', sign-out never reached the Bitborg ID end-session endpoint and
checkout could not go on to Mollie.
supernaut tvångsskickade fix/csp-form-action-redirects från 65dbf8b7f9
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m51s
till b6f9477cc3
Alla kontroller lyckades
ci / ci (pull_request) Successful in 1m51s
2026-10-10 20:37:56 +00:00
Jämför
supernaut schemalade den här ändringsförfrågan för automatisk sammanfogning när alla kontroller lyckas 2026-10-10 20:38:01 +00:00
supernaut sammanfogade incheckning d36ed79044 till main 2026-10-10 20:40:18 +00:00
supernaut tog bort grenen fix/csp-form-action-redirects 2026-10-10 20:40:18 +00:00
Logga in för att delta i denna konversation.
Inga granskare
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-web!343
Ingen beskrivning angiven.