Security: Fix do not forward login cookie in outgoing requests

(cherry picked from commit 709657b40ab4c77ce65b7fc1b653acb998570409)
This commit is contained in:
Marcus Efraimsson authored and Sofia Papagiannaki committed 2022-10-11 13:04:53 +03:00
1 parent f80476a7ef
commit b571acc1dc
10 files changed
+52 -27

No files matched your search

+1 -1
View File
@@ -223,7 +223,7 @@ func (proxy *DataSourceProxy) director(req *http.Request) {
applyUserHeader(proxy.cfg.SendUserHeader, req, proxy.ctx.SignedInUser)
proxyutil.ClearCookieHeader(req, proxy.ds.AllowedCookies())
proxyutil.ClearCookieHeader(req, proxy.ds.AllowedCookies(), []string{proxy.cfg.LoginCookieName})
req.Header.Set("User-Agent", fmt.Sprintf("Grafana/%s", setting.BuildVersion))
jsonData := make(map[string]interface{})