From bc6a34b36626981a67e354f616b7fa9e34a3f474 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 19 Jan 2024 04:25:14 +0100 Subject: [PATCH] feat: Sanitize filename --- src/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/install.sh b/src/install.sh index ce7872f..06f0761 100644 --- a/src/install.sh +++ b/src/install.sh @@ -60,8 +60,7 @@ if [ ! -f "$STORAGE/$BASE" ]; then else - BASE=$(basename "$VERSION") - BASE="${BASE%%\?*}" + BASE=$(basename "${VERSION%%\?*}") : "${BASE//+/ }"; printf -v BASE '%b' "${_//%/\\x}" BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')