mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-05-17 13:04:23 +00:00
Merge pull request #12991 from gkurz/opa-fix-traversal-regex
genpolicy: Fix matching of `..` in paths
This commit is contained in:
@@ -1520,7 +1520,7 @@ strip_cap_prefix(s) := result if {
|
||||
}
|
||||
|
||||
check_directory_traversal(i_path) if {
|
||||
not regex.match("(^|/)..($|/)", i_path)
|
||||
not regex.match("(^|/)\\.\\.($|/)", i_path)
|
||||
}
|
||||
|
||||
allow_sandbox_storages(i_storages) if {
|
||||
|
||||
Reference in New Issue
Block a user