Files
gitea-MIRROR/modules/setting
Yuanyuan Chen 3edd96b2a1 fix(auth)!: disable query-token authentication by default (#40297)
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>
2026-11-27 21:36:16 +00:00
..
2026-06-08 17:16:22 +00:00
2026-09-23 23:14:31 +00:00
2026-09-12 08:15:23 +00:00
2026-09-12 08:15:23 +00:00
2023-07-04 18:36:08 +00:00
2025-10-23 08:35:48 +00:00
2026-11-26 10:50:01 +00:00
2026-09-23 23:14:31 +00:00