From 8c94022f42f22989c66dd9891c4809b5635d8906 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Thu, 4 Jul 2013 06:40:33 +0000 Subject: [PATCH] Return 403 Forbidden for spam --- index.cgi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.cgi b/index.cgi index 4c9f27c..09e5c98 100755 --- a/index.cgi +++ b/index.cgi @@ -226,8 +226,9 @@ function do_upload { spam=$(echo -n "$body" | cut_file "ignoreme") text=$(echo -n "$body" | cut_file "(text|x)") bans=$(echo -n "$REMOTE_ADDR" | grep -f blacklist) - [ ! -z "$spam" ] && respond "Spam check.." - [ ! -z "$bans" ] && respond "You have been banned" + + [ ! -z "$spam" ] && respond -h "Status: 403 Forbidden" "Spam check.." + [ ! -z "$bans" ] && respond -h "Status: 403 Forbidden" "You have been banned" [ -z "$text" ] && respond "No text pasted" # Format and save message -- 2.43.2