BackendSrv: remove ampersand in validatePath (#109725)
remove ampersand from fetch URL split Co-authored-by: Isaiah Grigsby <isaiah.grigsby@grafana.com>
This commit is contained in:
1 parent
93a35fc7be
commit
be4dc6fdb6
1 file changed
+1
-1
@@ -156,7 +156,7 @@ export function validatePath<OriginalPath extends string>(path: OriginalPath): O
|
||||
}
|
||||
|
||||
// Remove query params and fragments to check only the path portion
|
||||
const cleaned = originalDecoded.split(/[\?&#]/)[0];
|
||||
const cleaned = originalDecoded.split(/[\?#]/)[0];
|
||||
originalDecoded = cleaned;
|
||||
|
||||
// If the original string contains traversal attempts, block it
|
||||
|
||||
Reference in new issue
Block a user