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.4 RN Issues
Author Message
helidoc
Hangin' Around



Joined: Jul 09, 2006
Posts: 49

PostPosted: Thu Jul 01, 2010 1:24 pm Reply with quote

Getting this error ERROR: Invalid Email when some of my users are attempting to register on the site or updating their email. The common factor is those that have an account with qwest and try to change their email from what it was to name@q.com can't seem to find anywhere where I could make changes to allow for the q.com email address. Any help is appreciated.


Last edited by helidoc on Sun Jul 04, 2010 10:22 pm; edited 1 time in total 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Fri Jul 02, 2010 10:20 am Reply with quote

1 character domains are valid? That's probably an issue with the email validation check.

_________________
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
helidoc







PostPosted: Fri Jul 02, 2010 10:32 am Reply with quote

Here's the whois fo q.com Shocked

Whois query for q.com...



Results returned from whois.internic.net:


Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

Domain Name: Q.COM
Registrar: CSC CORPORATE DOMAINS, INC.
Whois Server: whois.corporatedomains.com
Referral URL: http://www.cscglobal.com
Name Server: DCA-ANS-01.INET.QWEST.NET
Name Server: SVL-ANS-01.INET.QWEST.NET
Status: clientTransferProhibited
Updated Date: 15-apr-2009
Creation Date: 30-mar-1999
Expiration Date: 30-mar-2011

http://en.wikipedia.org/wiki/Single-letter_second-level_domain

So I guess my question would be is there a way to add q.com as a valid domain during the check.
 
sixonetonoffun
Spouse Contemplates Divorce



Joined: Jan 02, 2003
Posts: 2496

PostPosted: Sat Jul 03, 2010 7:49 am Reply with quote

Yeah I was suprised by this one of my relatives uses them and it blew my mind that was their valid email address. Not registered at my site so its never been an issue yet.

Seems to be this line from Your_Account/includes/functions.php line# 116
I'm not good with reg expressions but...
Code:


if ((!$user_email) || ($user_email == '') || (!eregi('^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$', $user_email))) $stop = _ERRORINVEMAIL . '<br />';


Try this until someone from the dev team creates a patch
Code:


if ((!$user_email) || ($user_email == '') || (!eregi('^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$', $user_email))) $stop = _ERRORINVEMAIL . '<br />';


I created and account with gfdse@q.com using the above. Not sure what it will catch but... thats someone elses todo!

_________________
[b][size=5]openSUSE 11.4-x86 | Linux 2.6.37.1-1.2desktop i686 | KDE: 4.6.41>=4.7 | XFCE 4.8 | AMD Athlon(tm) XP 3000+ | MSI K7N2 Delta-L | 3GB Black Diamond DDR
| GeForce 6200@433Mhz 512MB | Xorg 1.9.3 | NVIDIA 270.30[/size:2b8

Last edited by sixonetonoffun on Sat Jul 03, 2010 8:00 am; edited 1 time in total 
View user's profile Send private message
Palbin
Site Admin



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

PostPosted: Sat Jul 03, 2010 7:54 am Reply with quote

There is an email function in mainfile you could probably use. I don't know if it passes this type of email or not.

_________________
"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
gregexp
The Mouse Is Extension Of Arm



Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Sat Jul 03, 2010 8:10 pm Reply with quote

What about changing it like this:

Code:


if ((!$user_email) || ($user_email == '') || (!eregi('^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$', $user_email))) $stop = _ERRORINVEMAIL . '<br />';


with:
Code:


if ((!$user_email) || ($user_email == '') || (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", $email))) $stop = _ERRORINVEMAIL . '<br />';

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
sixonetonoffun







PostPosted: Sun Jul 04, 2010 7:13 am Reply with quote

Makes sense to me since its one of the depreciated eregi php5.3-php6 cleanups coming. One might go a step further and add an exceptions array like the forbidden one.

Next topic should probably be IPV6 addresses in the near future. I'd assume there will need to be some adjustments to validation of the new IP ranges there too?

If the OP accepts Gregs suggestion would be nice if the OP would edit thread (Solved).
 
helidoc







PostPosted: Sun Jul 04, 2010 10:22 pm Reply with quote

Sorry was busy at work for a few days, pesky frieght trains will not run themselves (thank god). I tried Gregs fix and still got the invalid email error tho sixones suggestion does work. I can't say I understand the code but it does work. Thanks.
 
gregexp







PostPosted: Mon Jul 05, 2010 7:34 am Reply with quote

Sorry about that, somehow the code got altered.

Code:


if ((!$user_email) || ($user_email == '') || (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", $user_email))) $stop = _ERRORINVEMAIL . '<br />';


Somehow $user_email got changed to just $email

probably my mistake from testing.
 
helidoc







PostPosted: Mon Jul 05, 2010 7:46 am Reply with quote

That worked Smile

Thanks Greg and thanks sixone for all the help. Qwest is one of the providers in my area so this should put some of the complaints to bed.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN 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 ©