View Full Version : [fixed] email addresses with two periods return as invalid
David Bott
Wed 24th Oct '01, 10:52pm
A user tried to register with an e-mail address such as...
user@kennedy.green-valley.az.us
VB did not seem to like the kennedy.green-valley.az.us domain and said the address was not valid.
Help please.
tubedogg
Thu 25th Oct '01, 3:06am
Yep, this is a bug...I'm going to move it to that forum.
It's not actually the long domain - it's the fact that there is more than one period after the @ sign.
John
Thu 25th Oct '01, 10:09am
Fixed
Replace line 248 of register.php with this:
if (!preg_match('/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+@([-0-9A-Z]+\.)+([0-9A-Z]){2,4}$/i', $email)) {
John
David Bott
Thu 25th Oct '01, 10:24am
Thank you.
David Bott
Thu 25th Oct '01, 12:09pm
UPDATE....From a member...
I'm having trouble reverifying the links below. When clicking on either, I get the message:
Parse error: parse error in
/dsk0/home/avsforum/www.avsforum.com/avs-vb/register.php on line 223
So it looks like the patch does not work.
John
Thu 25th Oct '01, 2:41pm
David, try again. It appears the [php] code tag had lost some of the PHP code.
John
David Bott
Thu 25th Oct '01, 3:32pm
Was it tested? 0 for 2 now....
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /dsk0/home/avsforum/www.avsforum.com/avs-vb/register.php on line 223
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /dsk0/home/avsforum/www.avsforum.com/avs-vb/register.php on line 223
Parse error: parse error
in /dsk0/home/avsforum/www.avsforum.com/avs-vb/register.php on line 223
Please test. :)
t0ecutter
Fri 26th Oct '01, 12:44pm
I had the same thing happen to me after I replaced that line, just clicking on the Register link gave a bunch of PHP errors.
DarkReaper
Sat 27th Oct '01, 11:34am
For those of you with hacked vBs:
Find:
if (!preg_match("/^(.+)@[a-zA-Z0-9-]+\.[a-zA-Z0-9.]+$/si", $email)) {
And replace with John's code:
if (!preg_match('/^[-!#$%&'*+\\.\/0-9=?A-Z^_`{|}~]+@([-0-9A-Z]+\.)+([0-9A-Z]){2,4}$/i', $email)) {
David Bott
Sat 27th Oct '01, 11:48am
And for those of us without hacked VB? :)
DarkReaper
Sat 27th Oct '01, 11:56am
Then you find the line number he mentioned, or do a search for that code...by hacked vB I meant that the line numbers would've changed...
BTW, John, that code didn't work for me. I got a blank page when trying to do anything with register.php:
if (!preg_match('/^[-!#$%&'*+\\.\/0-9=?A-Z^_`{|}~]+@([-0-9A-Z]+\.)+([0-9A-Z]){2,4}$/i', $email)) {
eval("standarderror(\"".gettemplate("error_bademail")."\");");
}
David Bott
Sat 27th Oct '01, 12:35pm
So then, you are saying the patch still does not fuction. Suggest removing the above posts so not to confuse others. (then I wall also need to remove mine.) :)
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.