vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Anti-Spam Options - Automatically deny registration for users with multi-dotted email address (https://vborg.vbsupport.ru/showthread.php?t=283540)

Boofo 05-27-2012 11:53 PM

I have complete faith in you, sir.

djbaxter 05-28-2012 12:24 AM

LOL. Well you're not going to get rich that way. :)

Boofo 05-28-2012 12:40 AM

I'll always be rich in friendship with you as a friend. ;)

kh99 05-28-2012 01:46 AM

Quote:

Originally Posted by Snowhog (Post 2333653)
You could write two additional plugins (give each a unique plugin name) using the code with only a slight modification.

That's a good thought, but unfortunately it won't work the way this is written. It replaces the code that verifies an email address, so if you have multiple plugins doing the same thing, only the last one to run would have any effect.

You might be able to do something like this:

Code:

$this->validfields['email'][VF_CODE] = '
    $max_chars = array("." => 1, ":" => 0, ";" => 0);
    if ($retval = $dm->verify_useremail($data))
    {
        $parts = explode("@", $data);
        if (is_array($parts))
        {
          foreach($max_chars AS $char => $max)
          {
              if (substr_count($parts[0], $char) > $max)
              {
                      $dm->error("bademail");
                      $retval = false;
                      break;
              }
          }
        }
    }
    return $retval;
';


(But I haven't tested it at all).

Boofo 05-28-2012 01:52 AM

You could even make the array a setting option to expand it. ;)

John Lester 05-28-2012 06:08 AM

Shouldn't this be titled something like "Automatically deny registration for users with multi-dotted email address" since it doesn't actually delete anything?

cloferba 05-28-2012 10:51 AM

Quote:

Originally Posted by John Lester (Post 2333801)
Shouldn't this be titled something like "Automatically deny registration for users with multi-dotted email address" since it doesn't actually delete anything?

you are right :)

Boofo 05-28-2012 01:13 PM

Or "Prevent users from registering with SPAM-like email addresses". ;)

victorvu 05-28-2012 05:34 PM

Hi:

This is totally unrelated, but I ask anyway. Hope that I will get the suggestion.

I want to deny guests who IPs do not show up in the list. How can I do this?

Thanks.

Victor

djbaxter 05-29-2012 03:05 PM

Quote:

Originally Posted by kh99 (Post 2333746)
That's a good thought, but unfortunately it won't work the way this is written. It replaces the code that verifies an email address, so if you have multiple plugins doing the same thing, only the last one to run would have any effect.

You might be able to do something like this:

Perfect.

Slight modification to prevent commas, semicolons, and colons, since I got another Chinese bot this morning trying to register with the email "liantianha,ofangjiancong@gmail.com":


PHP Code:

$this->validfields['email'][VF_CODE] = '
    $max_chars = array("." => 1, "," => 0,  ";" => 0, ":" => 0);
    if ($retval = $dm->verify_useremail($data))
    {
        $parts = explode("@", $data);
        if (is_array($parts))
        {
           foreach($max_chars AS $char => $max)
           {
               if (substr_count($parts[0], $char) > $max)
               {
                      $dm->error("bademail");
                      $retval = false;
                      break;
               }
           }
        }
    }
    return $retval;
'




All times are GMT. The time now is 02:12 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01128 seconds
  • Memory Usage 1,741KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete