]> Pileus Git - vpaste/commitdiff
Return 403 Forbidden for spam
authorAndy Spencer <andy753421@gmail.com>
Thu, 4 Jul 2013 06:40:33 +0000 (06:40 +0000)
committerAndy Spencer <andy753421@gmail.com>
Thu, 4 Jul 2013 06:40:33 +0000 (06:40 +0000)
index.cgi

index 4c9f27ccf83c6ccd0e6ac91812e5f451e0fcc6e9..09e5c985d394b6307e4dc22c5c8350195e3aa603 100755 (executable)
--- 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)
        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
        [   -z "$text" ] && respond "No text pasted"
 
        # Format and save message