FAQ FAQ   Search Search   Memberlist Memberlist   Usergroups Usergroups   Register Register 
PhpBB- & WordPress- antispam.com
Home of the Antispam for all fields mod ! 
  Profile Profile   Log in to check your private messages Log in to check your private messages  Log inLog in 

 PhpBB- & WordPress- antispam.com Forum Index » [PhpBB2] Feature requests » Location not tested?
  The time now is Fri Apr 28, 2017 5:21 am 

 Post new topic   Reply to topic View previous topic :: View next topic  
Author Message
PostPosted: Tue Jan 08, 2008 9:00 am    Post subject: Location not tested?  Reply with quote  

Quimbly



Joined: 08 Jan 2008
Posts: 6

Antispam: 1.2.8
PhpBB: 2.0.22

In the functions_validate.php file, it appears that the validate_optional_fields() function doesn't test location, even though it should.

The list at the bottom seems to validate everything except location:
Code:
   
validate_spam($icq,'word');   
validate_spam($aim,'word');
validate_spam($yim,'word');
validate_spam($website,'word');         
validate_spam($occupation,'word');   
validate_spam($interests,'word');   
validate_spam($sig,'word');   
validate_spam_website($website);
// Check remote website for forbidden words, V1.1.6   


I added:
Code:

validate_spam($location,'word');   


Make sense?

TOP View user's profileSend private message  BOTTOM
PostPosted: Tue Jan 08, 2008 10:45 am    Post subject:  Reply with quote  

ramon fincken
Site Admin


Joined: 11 Dec 2006
Posts: 269
Location: A'dam/Diemen, The Netherlands

well it does, yet I cannot guarantee that there are legit locations that would pass all wordlist tests, so therefore I have not implemented this one.

however in the function register_antispam_compare() in the functions_antispam.php are some timezone-location checks Smile
_________________
Phpbbantispam founder, available for freelance WordPress coding.

PhpBB2 mod: http://www.phpbbantispam.com/viewtopic.php?t=1
WordPress plugin: http://wordpress.org/extend/plugins/antispam-for-all-fields/
Project files & mailinglist: https://sourceforge.net/projects/phpbbantispam/

TOP View user's profileSend private messageVisit poster's website  BOTTOM
PostPosted: Tue Jan 08, 2008 4:00 pm    Post subject:  Reply with quote  

Quimbly



Joined: 08 Jan 2008
Posts: 6

Are the time-zome checks configurable from phpBB? That would be cool. I didn't see any place to do it.

If not, can you give me an example of their usage in code?

Many thanks!

TOP View user's profileSend private message  BOTTOM
PostPosted: Tue Jan 08, 2008 4:05 pm    Post subject:  Reply with quote  

ramon fincken
Site Admin


Joined: 11 Dec 2006
Posts: 269
Location: A'dam/Diemen, The Netherlands

Not that I know of, this is what I've done.

-12 is the most used timezone for spammers

Code:
   // Timezone tests
   if (isset ($timezone) && !empty ($timezone) && $timezone == -12) {
      $locations = array (
         'usa',
         'us',
         'london',
         'paris',
         'belgium',
         'holland',
         'bulgaria',
         'cambodia',
         'denmark',
         'denver',
         'deutschland',
         'england',
         'eritrea',
         'nigeria',
         'niger',
         'milan',
         'napels',
         'netherlands',
         'amsterdam',
         'europe'
      );
      foreach ($locations as $testlocation) {
         $pattern = '/' . $testlocation . '/';
         preg_match($pattern, strtolower($location), $matches, PREG_OFFSET_CAPTURE);
         if (count($matches) > 0) {
            return array (
               'error' => true,
               'error_msg' => 'No valid timezone.'
            );
         }
      }
      $location = str_replace(' ', '', $location);
      if (empty ($location)) {
         return array (
            'error' => true,
            'error_msg' => 'No valid location for this timezone.'
         );
      }
   }

_________________
Phpbbantispam founder, available for freelance WordPress coding.

PhpBB2 mod: http://www.phpbbantispam.com/viewtopic.php?t=1
WordPress plugin: http://wordpress.org/extend/plugins/antispam-for-all-fields/
Project files & mailinglist: https://sourceforge.net/projects/phpbbantispam/

TOP View user's profileSend private messageVisit poster's website  BOTTOM
 Post new topic   Reply to topic All times are GMT + 1 Hour

Display posts from previous:   
 PhpBB- & WordPress- antispam.com Forum Index » [PhpBB2] Feature requests » Location not tested?
 
 Page 1 of 1
 
 
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Jump to:  


     Powered by phpBB © 2001, 2005 phpBB Group | Template Neon | Snelle Managed WordPress webhosting