Unverified Commit 911a775a authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Sanitize filename (#351)

parent ceba754d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@ 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