Files
gitea/services
Shivansh Gargandwxiaoguang f270534e83 fix: validate "scope" for OAuth2, "state" for OpenID (#39642)
1. Fixes: https://github.com/go-gitea/gitea/issues/39641
* The OAuth2 authorize/grant endpoint accepted and persisted arbitrary
scope strings without validation, unlike personal access token creation
which rejects unknown scopes. Normalize and validate form.Scope before
creating or updating a grant, ignore invalid scopes
* `// TODO: at the moment invalid tokens are treated as "all" to avoid
breaking 1.22 behavior` is fixed.
2. To avoid CSRF attack for OpenID endpoint, add a state check

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-10-12 20:57:41 +00:00
..
2026-09-12 08:15:23 +00:00
2026-09-12 08:15:23 +00:00
2026-09-12 08:15:23 +00:00
2026-09-12 16:26:20 +00:00
2026-09-23 23:14:31 +00:00
2026-08-26 19:32:44 +00:00
2026-09-12 08:15:23 +00:00