From 2db25062a3b83b858b29422a2a3764b963f36248 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Tue, 18 Jul 2023 20:12:46 +0800 Subject: [PATCH] fix --- services/auth/sspi_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/auth/sspi_windows.go b/services/auth/sspi_windows.go index c162810797c84..eabfd5fa41bd0 100644 --- a/services/auth/sspi_windows.go +++ b/services/auth/sspi_windows.go @@ -89,9 +89,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 != "" {