From f4774a63793fbaa22d34f01a845323c6b689a9e9 Mon Sep 17 00:00:00 2001 From: Zachary Vance Date: Sun, 5 Feb 2017 11:36:08 -0800 Subject: [PATCH] Make sc.txt.cgi slightly more paranoid --- cgi-bin/sc.txt.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgi-bin/sc.txt.cgi b/cgi-bin/sc.txt.cgi index dc2c357..ebdbfbe 100755 --- a/cgi-bin/sc.txt.cgi +++ b/cgi-bin/sc.txt.cgi @@ -5,7 +5,7 @@ echo QUERY_FILE="${PATH_TRANSLATED}" [[ "${QUERY_FILE}" == *.sc.txt ]] || echo "Invalid .sc.txt file" >/dev/stderr && exit 1 QUERY_SC_FILE="$(echo "${QUERY_FILE} | sed -e 's/.txt$//')" -echo "${QUERY_SC_FILE}" >/dev/stderr +[ -f "${QUERY_SC_FILE}" ] || echo "Invalid .sc file" >/dev/stderr && exit 1 echo "Source: https://za3k.com/${QUERY_SC_FILE}" echo -- 2.47.3