modules/programs: sane-sandboxed: fix but that --sane-sandbox-path / wasnt being canonicalized
This commit is contained in:
parent
55c305812d
commit
95cb5624ca
|
@ -645,8 +645,9 @@ canonicalizePaths() {
|
|||
for _path in "${_normPaths[@]}"; do
|
||||
_isSubpath=
|
||||
for _other in "${_normPaths[@]}"; do
|
||||
if [[ "$_path" =~ ^$_other/.* ]]; then
|
||||
if [[ "$_path" =~ ^$_other/.* ]] || [ "$_other" = "/" ] && [ "$_path" != "/" ]; then
|
||||
# N.B.: $_path lacks a trailing slash, so this never matches self.
|
||||
# UNLESS $_path or $_other is exactly `/`, which we special-case.
|
||||
_isSubpath=1
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue
Block a user