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