Skip to content

Commit

Permalink
Fix SSPI auth panic (go-gitea#25955)
Browse files Browse the repository at this point in the history
Try to fix go-gitea#25952

Co-authored-by: Giteabot <[email protected]>
  • Loading branch information
wxiaoguang and GiteaBot committed Jul 18, 2023
1 parent b7d054e commit f8533ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/auth/sspi_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down

0 comments on commit f8533ea

Please sign in to comment.