diff options
Diffstat (limited to 'services/auth/auth.go')
-rw-r--r-- | services/auth/auth.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/auth/auth.go b/services/auth/auth.go index a2523a2452..43ff95f053 100644 --- a/services/auth/auth.go +++ b/services/auth/auth.go @@ -103,8 +103,8 @@ func handleSignIn(resp http.ResponseWriter, req *http.Request, sess SessionStore middleware.SetLocaleCookie(resp, user.Language, 0) - // Clear whatever CSRF has right now, force to generate a new one + // force to generate a new CSRF token if ctx := gitea_context.GetWebContext(req); ctx != nil { - ctx.Csrf.DeleteCookie(ctx) + ctx.Csrf.PrepareForSessionUser(ctx) } } |