1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-13 04:58:19 +00:00

Fix context usage (#33554) (#33557)

Backport #33554
This commit is contained in:
wxiaoguang
2025-02-11 19:46:27 +08:00
committed by GitHub
parent 7794ff0874
commit 8fa3925874
6 changed files with 11 additions and 10 deletions

View File

@@ -104,7 +104,7 @@ func handleSignIn(resp http.ResponseWriter, req *http.Request, sess SessionStore
middleware.SetLocaleCookie(resp, user.Language, 0)
// force to generate a new CSRF token
if ctx := gitea_context.GetWebContext(req); ctx != nil {
if ctx := gitea_context.GetWebContext(req.Context()); ctx != nil {
ctx.Csrf.PrepareForSessionUser(ctx)
}
}