Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.30.01 RN All Other Issues
Author Message
dad7732
RavenNuke(tm) Development Team



Joined: Mar 18, 2007
Posts: 1242

PostPosted: Fri Aug 14, 2009 3:32 pm Reply with quote

I have several mail domains blocked in the users - limits but there is one that I have removed but it is still being blocked for users attempting to register. Where is this table in the DB ?

Cheers
 
View user's profile Send private message
dad7732







PostPosted: Fri Aug 14, 2009 4:45 pm Reply with quote

I think I found the problem and it appears to be a bug. At one time I had gmail.com as a blocked domain. I removed it and it still shows as a blocked domain when a user@gmail.com attempts to register. I removed mail.com and now gmail.com is allowed.

Cheers
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sun Aug 16, 2009 6:06 am Reply with quote

Is this in NukeSentinel(tm) or RNYA?
 
View user's profile Send private message
dad7732







PostPosted: Sun Aug 16, 2009 6:35 am Reply with quote

This is in the "Edit Users" "configuration" menu.

Cheers
 
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sun Aug 16, 2009 7:28 am Reply with quote

Check your string blockers configuration in NS just to be sure you don't have it blocked as a string in addition to having it blocked in RNYA. These are separate blocks and some of us old fogies have found ourselves forgetting that lately and blocking something in both places.
 
View user's profile Send private message Visit poster's website
dad7732







PostPosted: Sun Aug 16, 2009 7:39 am Reply with quote

Nope, not in the string blockers. If I remove "mail.com" then gmail works. If I re-add "mail.com" then gmail is blocked. Weird ...

Cheers
 
fkelly







PostPosted: Sun Aug 16, 2009 8:49 am Reply with quote

I haven't run this through any tests but in functions.php in the /includes directory of YA, in the ya_MailCheckB function we do this:

Code:
   if ($ya_config['bad_mail'] > '') {

      $BadMailList = explode("\r\n", $ya_config['bad_mail']);
      $j = count($BadMailList);
      for ($i = 0;$i < $j;++$i) {
         if (eregi($BadMailList[$i], $user_email)) $return = 'false';
      }
   }


$BadMailList will be an array of blocked domains from your YA configuration. I'm thinking that mail.com, being a subset of gmail.com will cause a match in the eregi and thus cause the gmail to be blocked. We might need to use another function that looks for an exact match but I'll leave that determination to the eregi experts or someone who has time to experiment.
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Sun Aug 16, 2009 12:13 pm Reply with quote

Give this a try

Code:


   if ($ya_config['bad_mail'] > '') {
      $BadMailList = explode("\r\n", $ya_config['bad_mail']);
      $email_parts = explode('@', $user_email);
      $j = count($BadMailList);
      for ($i = 0;$i < $j;++$i) {
         if ($BadMailList[$i] == $email_parts[1]) $return = 'false';
      }
   }

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
dad7732







PostPosted: Sun Aug 16, 2009 1:55 pm Reply with quote

If I am editing the correct file - functions.php - then that doesn't work, mail.com still blocks gmail.com

Cheers
 
Palbin







PostPosted: Sun Aug 16, 2009 2:03 pm Reply with quote

I didn't test it before, but I will no because I don't see how that is possible Sad
 
dad7732







PostPosted: Sun Aug 16, 2009 2:25 pm Reply with quote

And I don't enough to know why not but the fact remains that mail.com will block gmail.com 100% reproducible on more than one domain installation.

Cheers
 
dad7732







PostPosted: Sun Aug 16, 2009 2:34 pm Reply with quote

Ok, there was two places in functions.php with the same code, I pasted the new code in the other one now and now it works.

Cheers
 
Palbin







PostPosted: Sun Aug 16, 2009 2:57 pm Reply with quote

My above code change works, but i did find a bug in the form checker on the registration page. If you try a blocked address and it tells you its blocked, and then try a second blocked address it will tell you that the first address is the one that is blocked. This happens no matter how many blocked emails you try.

dad7732, make sure you changed the ya_mailCheckB function not the ya_mailCheck function. Both of them need changed, but the ya_mailCheckB function is the one causing the problem here.
 
dad7732







PostPosted: Sun Aug 16, 2009 3:00 pm Reply with quote

I only changed one as per my reply above. After checking the file I found the second one and changed that as well. It works now .. thanks.

Cheers
 
Palbin







PostPosted: Sun Aug 16, 2009 4:41 pm Reply with quote

Sorry must have been typing when you responded.
 
fkelly







PostPosted: Sun Aug 16, 2009 4:45 pm Reply with quote

Thanks also Palbin. But I have to confess I'm a little uneasy with this solution but don't have time to hammer on it now. The variable $BadMailList will be an array with one element for each email domain you ban. So if you ban mail.com and mail.ru then $BadMailList[0] will be "mail.com" and $BadMailList[1] will be "mail.ru". No? So then you are exploding user_email on the @ sign. If a user puts in kibbles@gmail.com then $email_parts[0] will be kibbles and $email_parts[1] will be gmail.com. No? So then you will never match on $BadMailList[$i] being equal to $email_parts[1]. Sorry out of time but I think we need to look at this more carefully. There is some form of eregi that does an exact match I think.
 
dad7732







PostPosted: Sun Aug 16, 2009 5:18 pm Reply with quote

I have both mail.com and mail.ru in the block list, gmail is not blocked. So what is the downside of this, I'll experiment with it if you tell me what to do.

Cheers
 
fkelly







PostPosted: Sun Aug 16, 2009 5:49 pm Reply with quote

try entering a user with mail.com and see if it gets blocked.
 
Palbin







PostPosted: Sun Aug 16, 2009 6:15 pm Reply with quote

In the Limits it says "Blocked Mail Domains" so that is how I handled it. If you want to ban an individual email then yes it will need rewritten. I don't see the point in blocking an individual email since it is fairly easy to get a new on now a days.

I'm going to open a mantis issue because this is a bug no matter how we look at it.


Last edited by Palbin on Sun Aug 16, 2009 6:27 pm; edited 1 time in total 
Palbin







PostPosted: Sun Aug 16, 2009 6:25 pm Reply with quote

fkelly wrote:
Thanks also Palbin. But I have to confess I'm a little uneasy with this solution but don't have time to hammer on it now. The variable $BadMailList will be an array with one element for each email domain you ban. So if you ban mail.com and mail.ru then $BadMailList[0] will be "mail.com" and $BadMailList[1] will be "mail.ru". No? So then you are exploding user_email on the @ sign. If a user puts in kibbles@gmail.com then $email_parts[0] will be kibbles and $email_parts[1] will be gmail.com. No? So then you will never match on $BadMailList[$i] being equal to $email_parts[1]. Sorry out of time but I think we need to look at this more carefully. There is some form of eregi that does an exact match I think.


Ok I think I misunderstood what you were trying to say, but I think you typed something wrong. You said that if you have $BadMailList[0]=>mail.com and $BadMailList[1]=>mail.ru and then user enters kibbles@gmail.com. Well gmail.com isn't blocked so it wouldn't/shouldn't match.

Now if you meant to say kibbles@mail.com it would hit because $email_parts[1]=>mail.com and it would cycle through the entire $BadMailList array.
 
fkelly







PostPosted: Sun Aug 16, 2009 6:27 pm Reply with quote

yeah, you are right Palbin. Still it would be good to have it in Mantis and just have some other less tired eyes than mine look at it. But yeah we would just want to block domains.
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Sun Aug 16, 2009 7:19 pm Reply with quote

This was a known issue, I believe. I'm OK with changing it, but it needs to be clearly described in case some wanted that behavior.

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sat Aug 22, 2009 8:20 am Reply with quote

I am ok as well and the label on the page says this clearly IMO: "Blocked Mail Domains". It doesn't say "Blocked Email Addresses" or "Blocked Mail Domains/Addresses". I think we're "good"?

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.30.01 RN All Other Issues

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©