summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-07-18 18:28:06 -0400
committerGitHub <noreply@github.com>2023-07-18 22:28:06 +0000
commit227c3b67e0b635a1adad3437d8d911da79d40681 (patch)
treeba05f5d31ab76292697659ca762d4aa6174da3a0
parent5c3662b9021a090162629987b0ecf0b34f7f14e7 (diff)
downloadgitea-227c3b67e0b635a1adad3437d8d911da79d40681.tar.gz
gitea-227c3b67e0b635a1adad3437d8d911da79d40681.zip
Fix SSPI auth panic (#25955) (#25969)
Backport #25955 by @wxiaoguang Try to fix #25952 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
-rw-r--r--services/auth/sspi_windows.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/auth/sspi_windows.go b/services/auth/sspi_windows.go
index d49497e19c..b07bd9bce1 100644
--- a/services/auth/sspi_windows.go
+++ b/services/auth/sspi_windows.go
@@ -97,9 +97,9 @@ func (s *SSPI) Verify(req *http.Request, w http.ResponseWriter, store DataStore,
}
store.GetData()["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn
store.GetData()["EnableSSPI"] = true
- // in this case, the store is Gitea's web Context
+ // in this case, the Verify function is called in Gitea's web context
// FIXME: it doesn't look good to render the page here, why not redirect?
- store.(*gitea_context.Context).HTML(http.StatusUnauthorized, tplSignIn)
+ gitea_context.GetWebContext(req).HTML(http.StatusUnauthorized, tplSignIn)
return nil, err
}
if outToken != "" {