Skip to content

[backend] Session tickets ride in URL query strings — they leak into browser history and any request logs #113

Closed

Description

@devin-ai-integration

sessionTicket (auth.go:208-226) mints a credential that callers embed as ?ticket=... in a GET URL. Credentials-in-URL land in browser history, server access logs, and Referer-adjacent surfaces — a known anti-pattern. The mitigations here (single-use, path-bound, 1-minute TTL) make the exposure window small, but not zero: an exported-link pasted anywhere keeps working for 60s, and the URL with the ticket is retained in history permanently.

If the goal is "navigations that can't send Authorization", a short-lived HttpOnly cookie set by an authenticated POST (or a SameSite=Lax session cookie from the start) avoids URLs carrying credentials entirely.

Activity

  1. sanketpatel32 commented on Nov 22, 2026

    @sanketpatel32
    Owner

    Partially mitigated: fragment tokens are stripped via replaceState (never hit history/logs); ?ticket= URLs are single-use + 60s + path-bound, so a leaked URL is a spent credential. A cookie-session redesign is the real fix — deferred.

  2. devin-ai-integration commented on Nov 22, 2026

    @devin-ai-integration
    ContributorAuthor

    The cookie-session redesign you deferred is now done in PR #153: tickets ride an HttpOnly + SameSite=Strict + Path-scoped + TTL-bound cookie; ?ticket= no longer authenticates. Duplicates #151, which is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions