Double quotes to prevent bash apocalypse

This commit is contained in:
Alexandre Aubin 2021-10-07 10:37:05 +02:00 committed by GitHub
parent 1d2e4e78f2
commit f769c40f96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -737,7 +737,7 @@ _acceptable_path_to_delete() {
# Use realpath to normalize the path ..
# i.e convert ///foo//bar//..///baz//// to /foo/baz
file=$(realpath --no-symlinks $file)
file=$(realpath --no-symlinks "$file")
if [ -z "$file" ] || grep -q -x -F "$file" <<< "$forbidden_paths"; then
return 1
else