aboutsummaryrefslogtreecommitdiffstats
path: root/services/auth/auth.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-05-23 09:29:15 +0800
committerGitHub <noreply@github.com>2023-05-23 09:29:15 +0800
commitabcf5a7b5e2c3df951b8048317a99a89b040b489 (patch)
tree46f089aec1c83dfa45e7e9ff18cbe4e508306cbb /services/auth/auth.go
parent5c0745c0349f0709d0fc36fd8a97dcab86bce28a (diff)
downloadgitea-abcf5a7b5e2c3df951b8048317a99a89b040b489.tar.gz
gitea-abcf5a7b5e2c3df951b8048317a99a89b040b489.zip
Fix install page context, make the install page tests really test (#24858)
Fix #24856 Rename "context.contextKey" to "context.WebContextKey", this context is for web context only. But the Context itself is not renamed, otherwise it would cause a lot of changes (if we really want to rename it, there could be a separate PR). The old test code doesn't really test, the "install page" gets broken not only one time, so use new test code to make sure the "install page" could work.
Diffstat (limited to 'services/auth/auth.go')
-rw-r--r--services/auth/auth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/auth/auth.go b/services/auth/auth.go
index 905c776e58..c7fdc56cbe 100644
--- a/services/auth/auth.go
+++ b/services/auth/auth.go
@@ -92,7 +92,7 @@ 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
- if ctx := gitea_context.GetContext(req); ctx != nil {
+ if ctx := gitea_context.GetWebContext(req); ctx != nil {
ctx.Csrf.DeleteCookie(ctx)
}
}