WordPress.org

Plugin Directory

Changeset 488184


Ignore:
Timestamp:
01/11/12 14:22:32 (2 years ago)
Author:
ramon fincken
Message:

New version

Location:
antispam-for-all-fields
Files:
8 added
2 edited

Legend:

Unmodified
Added
Removed
  • antispam-for-all-fields/trunk/antispam-for-all-fields.php

    r476948 r488184  
    55 Description: Class and functions 
    66 Author: Ramon Fincken 
    7  Version: 0.7.6 
     7 Version: 0.7.7 
    88 Author URI: http://www.mijnpress.nl 
    99 */ 
     
    438438        } 
    439439         
    440         if ($commentdata['comment_type'] == 'trackback' || $commentdata['comment_type'] == 'pingback') { 
    441             return $status; 
    442         } 
    443  
    444440        $email = $commentdata['comment_author_email']; 
    445441        $author = $commentdata['comment_author']; 
    446442        $url = $commentdata['comment_author_url']; 
    447443        $comment_content = $commentdata['comment_content']; 
     444                 
     445        // Trackback or pingback? 
     446        if ($commentdata['comment_type'] == 'trackback' || $commentdata['comment_type'] == 'pingback') { 
     447             
     448            // Simple trackback validation with topsy blocker Stage 1 
     449            $tmpSender_IP = preg_replace('/[^0-9.]/', '', $_SERVER['REMOTE_ADDR'] ); 
     450 
     451            $authDomainname = stbv_get_domainname_from_uri($url); 
     452            $tmpURL_IP = preg_replace('/[^0-9.]/', '', gethostbyname($authDomainname) ); 
     453 
     454            if ( $tmpSender_IP != $tmpURL_IP) { 
     455                 
     456                $status = 'spam'; 
     457                 
     458                $body = "Details are below: \n"; 
     459                $body .= "action: ".'Sender\'s IP address (' . $tmpSender_IP . ') not equal to IP address of host (' . $tmpURL_IP . ')'."\n"; 
     460 
     461                $body .= "IP adress " . $this->user_ip . "\n"; 
     462                $body .= "Email adress " . $email . "\n"; 
     463 
     464                foreach ($commentdata as $key => $val) { 
     465                    $body .= "$key : $val \n"; 
     466                } 
     467 
     468                $commment_key = $this->store_comment($commentdata,'spammed'); 
     469                $this->mail_details('rejected spammed sender IP not equal to host IP', $body,$commment_key); 
     470                $this->update_stats('spammed');              
     471            } 
     472            return $status; 
     473        } 
     474         
     475        // Comments only 
     476 
     477 
    448478 
    449479         
  • antispam-for-all-fields/trunk/readme.txt

    r476948 r488184  
    22Contributors: Ramon Fincken 
    33Donate link: http://donate.ramonfincken.com 
    4 Tags: spam,antispam,phpbbantispam,anti-spam,wordpressantispam 
     4Tags: spam,antispam,phpbbantispam,anti-spam,wordpressantispam,comment,comments,pingback,trackback,ip,lookup 
    55Requires at least: 2.0.2 
    6 Tested up to: 3.3 
    7 Stable tag: 0.7.6 
     6Tested up to: 3.3.1 
     7Stable tag: 0.7.7 
    88 
    99Plugin to reject spam. Port from same author from http://www.phpbbantispam.com 
     
    1717* Count for number of web-URI's in comment<br> 
    1818* Count on email, IP, URI compared with allready spammed comments<br> 
     19* Checks trackbacks and pingbacks for a valid IP adres (IP visitor must be same as webserver)<br> 
    1920* Detailed information by email about the spammed comment. You can approve the comment later on, or blacklist the IP adres.<br> 
    2021* Future feature: Add hidden fields with random names<br> 
     
    3940 
    4041== Changelog == 
     42= 0.7.7 = 
     43Added: Trackback and pingback stage 1, based on Simple trackback validation with topsy blocker Stage 1  
     44 
    4145= 0.7.6 = 
    4246Added: New spam definitions 
Note: See TracChangeset for help on using the changeset viewer.