Skip to content

fix: replace dashboard ?token= query param with HttpOnly session cookie (#22)#27

Merged
peg merged 2 commits intomainfrom
fix/issue-22-dashboard-token
Mar 18, 2026
Merged

fix: replace dashboard ?token= query param with HttpOnly session cookie (#22)#27
peg merged 2 commits intomainfrom
fix/issue-22-dashboard-token

Conversation

@peg
Copy link
Copy Markdown
Owner

@peg peg commented Mar 18, 2026

Fixes #22.

The dashboard was authenticating via ?token= query param, leaking to browser history, server logs, and referrer headers.

Changes:

  • Added POST /login — accepts token in JSON body, sets HttpOnly; Secure; SameSite=Strict session cookie
  • Added GET /logout — clears the session cookie
  • All dashboard routes now check cookie instead of query param
  • API clients can still use Bearer token in Authorization header
  • Login form POSTs to /login instead of appending token to URL

clap [bot] and others added 2 commits March 18, 2026 16:35
…ie (#22)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Secure=true breaks plain HTTP self-hosted instances (localhost, internal
servers without TLS). Only set Secure when TLSDomain is configured.
@peg peg merged commit 615dbeb into main Mar 18, 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.

fix: dashboard token leaks via URL query parameter

1 participant