toymaker.git

commit dd788baec709171d1ebe6fd252806659fb2241b9

Author: Adam <git@apiote.xyz>

add checking path when deleting build

 toymaker.sh | 6 ++++++


diff --git a/toymaker.sh b/toymaker.sh
index 8faa0476ac1c379496354dd1fac2cf21c85f24f3..84c1a27ef5b710a3d6ce187459e5468834a7f5e0 100755
--- a/toymaker.sh
+++ b/toymaker.sh
@@ -292,6 +292,12 @@ 		if [ "$(slashes "$path")" -eq 3 ]
 		then
 			toy=$(field "$path" 3)
 			item=$(field "$path" 4)
+			if [ -z "$toy" ] || [ -z "$item" ]
+			then
+				respond404 "$path"
+				return 1
+			fi
+
 			if stop_item "$toy" "$item"
 			then
 				respond200 ""