1
1
mirror of https://github.com/go-gitea/gitea.git synced 2026-03-17 13:16:32 +01:00
gitea/routers/web/auth
Giteabot 413074b1e1
Fix OAuth2 authorization code expiry and reuse handling (#36797) (#36851)
Backport #36797 by @lunny

- set OAuth2 authorization code `ValidUntil` on creation and add expiry
checks during exchange
- return a specific error when codes are invalidated twice to prevent
concurrent reuse
- add unit tests covering validity timestamps, expiration, and double
invalidation

---
Generate by a coding agent with Codex 5.2

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-06 10:33:20 -08:00
..
2fa.go Refactor OpenIDConnect to support SSH/FullName sync (#34978) 2025-07-10 18:35:59 +00:00
auth_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
auth.go Fix session gob (#35128) 2025-07-20 01:49:36 +00:00
linkaccount.go Fix session gob (#35128) 2025-07-20 01:49:36 +00:00
main_test.go
oauth2_provider.go Fix OAuth2 authorization code expiry and reuse handling (#36797) (#36851) 2026-03-06 10:33:20 -08:00
oauth_signin_sync.go Fix session gob (#35128) 2025-07-20 01:49:36 +00:00
oauth_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
oauth.go Make Golang correctly delete temp files during uploading (#36128) (#36129) 2025-12-11 20:10:59 +01:00
openid.go Refactor OpenIDConnect to support SSH/FullName sync (#34978) 2025-07-10 18:35:59 +00:00
password.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
webauthn.go Refactor OpenIDConnect to support SSH/FullName sync (#34978) 2025-07-10 18:35:59 +00:00