From: Andy Spencer Date: Thu, 4 Jul 2013 06:40:33 +0000 (+0000) Subject: Return 403 Forbidden for spam X-Git-Url: http://pileus.org/git/?p=vpaste;a=commitdiff_plain;h=8c94022f42f22989c66dd9891c4809b5635d8906 Return 403 Forbidden for spam --- 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