Summary
authalice accepts the API token from the URL query string as a fallback. Query strings are routinely captured by reverse-proxy/access logs, browser history, and Referer headers — leaking long-lived credentials.
Details
// handlers.go:156-158
token := r.Header.Get("token")
if token == "" {
token = strings.Join(r.URL.Query()["token"], "")
}
Any call made as ...?token=<secret> records the token in plaintext in nginx/Caddy/Traefik access logs, etc.
Proposed fix
Deprecate query-string auth. Removing it outright would break integrations that can't set headers, so suggest a transition:
- log a deprecation warning when a token arrives via query, document header-only usage, then remove in a later release; or
- if a credential must be URL-passable, issue a separate short-lived token instead of the long-lived API token.
Location
Happy to PR whichever path you prefer.
Summary
authaliceaccepts the API token from the URL query string as a fallback. Query strings are routinely captured by reverse-proxy/access logs, browser history, andRefererheaders — leaking long-lived credentials.Details
Any call made as
...?token=<secret>records the token in plaintext in nginx/Caddy/Traefik access logs, etc.Proposed fix
Deprecate query-string auth. Removing it outright would break integrations that can't set headers, so suggest a transition:
Location
handlers.go:156-158Happy to PR whichever path you prefer.