porchlight/tests/e2e
Johan Lundberg baef5e0e2e
fix(security): require CSRF-protected POST to consume a registration link
GET /register/{token} consumed the magic-link token and created a session, so
a side-effecting state change happened on a safe method — link prefetchers,
email scanners, or a cross-site GET could trigger account setup/login.

Split the flow: GET validates the token (without consuming) and renders a
confirmation form; POST /register/{token} consumes the token, runs the
existing checks, and establishes the session. The POST carries a CSRF token
and the session is reset on login as for other auth paths.

Refs: porchlight-9k0

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 13:40:30 +02:00
..
.gitignore test: add end-to-end browser tests with Playwright 2026-02-16 12:22:58 +01:00
admin.spec.js test: add profile validation e2e tests and fix pre-existing failures 2026-03-16 10:00:46 +01:00
auth-guard.spec.js refactor(e2e): migrate all tests to Playwright Test 2026-02-18 11:37:23 +01:00
credentials.spec.js fix: keep password form visible on validation error 2026-06-03 16:22:01 +02:00
full-flow.spec.js fix(security): require CSRF-protected POST to consume a registration link 2026-06-05 13:40:30 +02:00
health.spec.js refactor(e2e): migrate all tests to Playwright Test 2026-02-18 11:37:23 +01:00
login.spec.js fix(e2e): fix WebAuthn and integration test failures 2026-02-18 12:45:03 +01:00
logout.spec.js test: add e2e tests for logout buttons in admin and manage nav bars 2026-03-10 10:50:44 +01:00
package-lock.json feat: migrate e2e test infrastructure to @playwright/test 2026-02-18 11:10:23 +01:00
package.json feat: migrate e2e test infrastructure to @playwright/test 2026-02-18 11:10:23 +01:00
password-auth.spec.js refactor(e2e): migrate all tests to Playwright Test 2026-02-18 11:37:23 +01:00
playwright.config.js feat: migrate e2e test infrastructure to @playwright/test 2026-02-18 11:10:23 +01:00
profile.spec.js test: add profile validation e2e tests and fix pre-existing failures 2026-03-16 10:00:46 +01:00
registration.spec.js refactor(e2e): migrate all tests to Playwright Test 2026-02-18 11:37:23 +01:00
run.sh test: allow disabling rate limiting for e2e runs 2026-06-03 16:32:32 +02:00
setup_db.py fix: resolve all ruff lint errors and type checker warnings 2026-03-31 15:48:46 +02:00
webauthn.spec.js fix(e2e): fix WebAuthn and integration test failures 2026-02-18 12:45:03 +01:00