mirror of
https://github.com/go-gitea/gitea.git
synced 2026-12-03 21:32:25 -06:00
Query-string tokens end up in proxy and access logs, so `DISABLE_QUERY_AUTH_TOKEN` now defaults to `true`. The `token` and `access_token` query parameters are ignored on the API and on web routes that accept tokens, like raw, media, archive and attachment downloads. ## ⚠️ BREAKING ⚠️ Clients that send a token as `?token=` or `?access_token=` are treated as anonymous. Send it in the `Authorization: token <token>` header instead, or as the basic auth username (`https://<token>@host/...`) where only a URL can be configured. Admins can restore the old behavior for now with `[security] DISABLE_QUERY_AUTH_TOKEN = false`, which logs a deprecation warning at startup. Docs: https://gitea.com/gitea/docs/pulls/665 Assisted-by: Codex:gpt-6-astra Assisted-by: Claude Code:claude-opus-5-5 --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>