Skip to content

Commit 227c3b6

Browse files
GiteaBotwxiaoguang
andauthored
Fix SSPI auth panic (#25955) (#25969)
Backport #25955 by @wxiaoguang Try to fix #25952 Co-authored-by: wxiaoguang <[email protected]>
1 parent 5c3662b commit 227c3b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/auth/sspi_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ func (s *SSPI) Verify(req *http.Request, w http.ResponseWriter, store DataStore,
9797
}
9898
store.GetData()["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn
9999
store.GetData()["EnableSSPI"] = true
100-
// in this case, the store is Gitea's web Context
100+
// in this case, the Verify function is called in Gitea's web context
101101
// FIXME: it doesn't look good to render the page here, why not redirect?
102-
store.(*gitea_context.Context).HTML(http.StatusUnauthorized, tplSignIn)
102+
gitea_context.GetWebContext(req).HTML(http.StatusUnauthorized, tplSignIn)
103103
return nil, err
104104
}
105105
if outToken != "" {

0 commit comments

Comments
 (0)