Page Index Toggle Pages: 1
Topic Tools
Normal Topic Ban This Email: Not (Read 1,078 times)
Tanner
YaBB Newcomer
*
Offline



Posts: 11
Ban This Email: Not
Apr 25th, 2012 at 3:16pm
Post Tools
A spammer came by, left the typical dump in one of my sections. My practice is to view their profile from the message, ban username, ban email. I've never failed to get the line "Ban This Email" to change to "Unban This Email", which confirms the email is banned, right?

This time the line on "Ban This Email" refused to change. The screen would renew as should be, but the line remained: "Ban This Email", which confirms to me that no change in this status has taken place.

This spammer did use a bit of an odd email address: "jonas3n6+ld@gmail.com".

I'm wondering if the "+" in the email address is somehow screwing the code from preforming correctly because this feature has NEVER failed to work for me before?

Makes you say, "Hmmmm..."
  
Back to top
 
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Ban This Email: Not
Reply #1 - Apr 25th, 2012 at 3:40pm
Post Tools
Hi Tanner,

I'm not sure if users should be allowed to register or not in the first place with that character in their email. Anyhow, to fix it, you'll need to URL encode the email address.

In Sources/Profile.pl find:

Code (Perl)
Select All
        if ($is_banned =~/E/) { $ban_email_link = qq~<a href="$adminurl?action=ipban3;ban_email=${$uid.$user}{'email'};username=$useraccount{$user};unban=1"><span class="small">[$profile_txt{'904'}]</span></a>~; }
        else { $ban_email_link = qq~<a href="$adminurl?action=ipban3;ban_email=${$uid.$user}{'email'};username=$useraccount{$user}"><span class="small">[$profile_txt{'907'}]</span></a>~; } 


And replace with:

Code (Perl)
Select All
        $ban_user_email = ${$uid.$user}{'email'};
        $ban_user_email =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
        if ($is_banned =~/E/) { $ban_email_link = qq~<a href="$adminurl?action=ipban3;ban_email=$ban_user_email;username=$useraccount{$user};unban=1"><span class="small">[$profile_txt{'904'}]</span></a>~; }
        else { $ban_email_link = qq~<a href="$adminurl?action=ipban3;ban_email=$ban_user_email;username=$useraccount{$user}"><span class="small">[$profile_txt{'907'}]</span></a>~; } 


  
Back to top
 
IP Logged
 
Bill Myers
God Member
Beta Testers
*****
Offline



Posts: 1,684
Location: Los Angeles

YaBB 2.5
Re: Ban This Email: Not
Reply #2 - Apr 25th, 2012 at 5:34pm
Post Tools
The kind of email address that the spammer used is an alias that is offered by Google, which is normally a great feature.

I suppose YaBB needs to update its software by including Derek's fix.

As for disallowing such an alias, that would be like disallowing new technology, which isn't a sensible thing to do. Besides, people should have the freedom to use whatever email address they choose. That personal choice shouldn't be in question; the way it's used is what matters.

For admins who aren't able to make the edit that Derek has been kind enough to give us so that they can ban such an email address as desired, thankfully we have the option of banning that user's IP address. Their username could also be banned.

Of course, installing an anti-spam mod would be the most effective way to shut down spammers.  Wink
  

Morning, noon, or night, have a great one!

Note: This forum doesn't allow for us to freely edit our posts or topics to make corrections as needed, so please remember to look for subsequent posts if you see any mistakes or outdated information. Sorry for the inconvenience.
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top