[v10.2.x] Auth: Fix a panic during logout when OAuth provider is not set (#80221)
Auth: check that oauthProvider is not nil in Logout() func (#79271)
check that oauthProvider is not nil
(cherry picked from commit bff2ac3627)
Co-authored-by: Mihai Doarna <mihai.doarna@grafana.com>
This commit is contained in:
co-authored by
Mihai Doarna
parent
1b3d09fdda
commit
715aaed12c
+3
-1
@@ -260,7 +260,9 @@ func (hs *HTTPServer) Logout(c *contextmodel.ReqContext) {
|
||||
}
|
||||
}
|
||||
oauthProvider := hs.SocialService.GetOAuthInfoProvider(strings.TrimPrefix(authInfo.AuthModule, "oauth_"))
|
||||
oauthProviderSignoutRedirectUrl = oauthProvider.SignoutRedirectUrl
|
||||
if oauthProvider != nil {
|
||||
oauthProviderSignoutRedirectUrl = oauthProvider.SignoutRedirectUrl
|
||||
}
|
||||
}
|
||||
|
||||
hs.log.Debug("Logout Redirect url", "auth.SignoutRedirectUrl:", hs.Cfg.SignoutRedirectUrl)
|
||||
|
||||
Reference in New Issue
Block a user