apply security patch: release-11.5.4/365-202504020730.patch

commit 27ee68a7899680bcf0763aa6a7b35d93829fa767
Author: Andres Martinez Gotor <andres.martinez@grafana.com>
Date:   Mon Mar 31 12:15:52 2025 +0200

    Sanitize paths before evaluating access to route
This commit is contained in:
github-actions[bot]
2025-04-22 13:47:05 +00:00
parent df9f37a726
commit 6c64b04c39
2 changed files with 17 additions and 1 deletions
+9 -1
View File
@@ -302,7 +302,15 @@ func (proxy *DataSourceProxy) validateRequest() error {
}
// route match
if !strings.HasPrefix(proxy.proxyPath, route.Path) {
r1, err := util.CleanRelativePath(proxy.proxyPath)
if err != nil {
return err
}
r2, err := util.CleanRelativePath(route.Path)
if err != nil {
return err
}
if !strings.HasPrefix(r1, r2) {
continue
}