mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Auth: Fix token rotation redirect when session storage redirect is enabled (#93906)
Fix token rotation redirect when session storage redirect is enabled
This commit is contained in:
parent
598179227c
commit
7e94d05d39
@ -88,7 +88,11 @@ func (hs *HTTPServer) RotateUserAuthTokenRedirect(c *contextmodel.ReqContext) re
|
||||
return response.Redirect(hs.GetRedirectURL(c))
|
||||
}
|
||||
|
||||
redirectTo := c.Query("redirectTo")
|
||||
if err := hs.ValidateRedirectTo(redirectTo); err != nil {
|
||||
return response.Redirect(hs.Cfg.AppSubURL + "/")
|
||||
}
|
||||
return response.Redirect(hs.Cfg.AppSubURL + redirectTo)
|
||||
}
|
||||
|
||||
// swagger:route POST /user/auth-tokens/rotate
|
||||
@ -133,7 +137,6 @@ func (hs *HTTPServer) rotateToken(c *contextmodel.ReqContext) error {
|
||||
IP: ip,
|
||||
UserAgent: c.Req.UserAgent(),
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user