resolve merge conflicts (#55503)
This commit is contained in:
@@ -527,8 +527,9 @@ func (s *Service) getCustomHeaders(jsonData *simplejson.Json, decryptedValues ma
|
||||
return headers
|
||||
}
|
||||
|
||||
index := 1
|
||||
index := 0
|
||||
for {
|
||||
index++
|
||||
headerNameSuffix := fmt.Sprintf("httpHeaderName%d", index)
|
||||
headerValueSuffix := fmt.Sprintf("httpHeaderValue%d", index)
|
||||
|
||||
@@ -538,10 +539,16 @@ func (s *Service) getCustomHeaders(jsonData *simplejson.Json, decryptedValues ma
|
||||
break
|
||||
}
|
||||
|
||||
// skip a header with name that corresponds to auth proxy header's name
|
||||
// to make sure that data source proxy isn't used to circumvent auth proxy.
|
||||
// For more context take a look at CVE-2022-35957
|
||||
if s.cfg.AuthProxyEnabled && http.CanonicalHeaderKey(key) == http.CanonicalHeaderKey(s.cfg.AuthProxyHeaderName) {
|
||||
continue
|
||||
}
|
||||
|
||||
if val, ok := decryptedValues[headerValueSuffix]; ok {
|
||||
headers[key] = val
|
||||
}
|
||||
index++
|
||||
}
|
||||
|
||||
return headers
|
||||
|
||||
Reference in New Issue
Block a user