fix: Sanitize filename (#351)
This commit is contained in:
parent
ceba754d75
commit
911a775a90
1 changed files with 3 additions and 1 deletions
|
@ -21,7 +21,9 @@ fi
|
|||
|
||||
BASE=$(basename "$BOOT")
|
||||
BASE="${BASE%%\?*}"
|
||||
|
||||
: "${BASE//+/ }"; printf -v BASE '%b' "${_//%/\\x}"
|
||||
BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')
|
||||
|
||||
[ -f "$STORAGE/$BASE" ] && return 0
|
||||
|
||||
TMP="$STORAGE/${BASE%.*}.tmp"
|
||||
|
|
Loading…
Reference in a new issue