Skip to content

GEN-2134: Fix browser logout origin rejection - #186

Merged
exe-dev-github-integration[bot] merged 1 commit into
mainfrom
fix/gen-2134-logout
Oct 8, 2026
Merged

exe-dev-github-integration[bot] merged 1 commit into
mainfrom
fix/gen-2134-logout

Conversation

@asselstine

Copy link
Copy Markdown
Collaborator

Clicking Log out submits a same-origin form, but the global no-referrer policy makes Chromium send Origin: null. The auth CSRF guard therefore returns Invalid request origin. Use Referrer-Policy: same-origin so native auth forms retain their Origin while external requests still omit Referer. Keep the existing strict Origin and cross-site checks.

Regression coverage verifies the page policy, successful logout redirect and cookie deletion, rejection of foreign/same-site/null/missing origins and cross-site fetch metadata, and no logout via GET.

Validation:

  • npm run build:css passed.
  • AUTH_TEST_DATABASE_URL= npm run check passed: 244 tests, including 12 real PostgreSQL auth tests; 8 existing optional database tests skipped. API boundaries, Postmark preflight tests, TypeScript across workspaces, and app/tail-relay Worker dry runs passed.
  • Chromium using the real profile-menu form and disposable PostgreSQL reproduced the original policy (Origin: null, 403), then confirmed the fixed policy (same-origin Origin, 302, redirect home, cookie removal, session-version revocation, and rejection of the old signed cookie).
  • git diff --check passed.

Fixes GEN-2134.

@linear

linear Bot commented Oct 8, 2026

Copy link
Copy Markdown

GEN-2134

@exe-dev-github-integration
exe-dev-github-integration Bot added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit cb54ded Oct 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant