From 04a821dddf4c5e4c1fec0bee4995163f6cdb58c1 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Wed, 12 Oct 2022 21:29:30 +0200 Subject: common: prevent globbing and word splitting in find_cached_package We changed the glob in 5d02c6df7f9cd3a2820149886e8a32e7d8e7a566 but we forgot to quote the newly introduced variables. --- lib/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/common.sh b/lib/common.sh index 4ebee4e..a5e4616 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -146,7 +146,7 @@ find_cached_package() { [[ -d $dir ]] || continue shopt -s extglob nullglob - mapfile -t packages < <(printf "%s\n" "$dir"/${targetname}-${targetver}-*${targetarch}.pkg.tar?(.!(sig|*.*))) + mapfile -t packages < <(printf "%s\n" "$dir"/"${targetname}"-"${targetver}"-*"${targetarch}".pkg.tar?(.!(sig|*.*))) shopt -u extglob nullglob for pkg in "${packages[@]}"; do -- cgit v1.2.3-70-g09d2