Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2022-10-12 21:29:30 +0200
committerLevente Polyak <anthraxx@archlinux.org>2022-10-12 21:29:30 +0200
commit04a821dddf4c5e4c1fec0bee4995163f6cdb58c1 (patch)
tree1150806c63074835cb03786a1043d81523e40a5d
parentd82bc697169558dcbb936f81c6451f9fb99199e1 (diff)
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.
-rw-r--r--lib/common.sh2
1 files changed, 1 insertions, 1 deletions
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