diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-07-19 01:32:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-18 17:32:49 +0000 |
commit | 265a28802a6062d86964c9bfe1959437eaf69afb (patch) | |
tree | 702c5834e15af1111804d7d8149662b25d749357 /services/auth | |
parent | dcb607d3cff2cb8de5632e77a886d59e620a07b9 (diff) | |
download | gitea-265a28802a6062d86964c9bfe1959437eaf69afb.tar.gz gitea-265a28802a6062d86964c9bfe1959437eaf69afb.zip |
Fix SSPI auth panic (#25955)
Try to fix #25952
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'services/auth')
-rw-r--r-- | services/auth/sspi_windows.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/auth/sspi_windows.go b/services/auth/sspi_windows.go index c162810797..eabfd5fa41 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 != "" { |