FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Space ignored in eMail-Validation
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Space ignored in eMail-Validation [message #21931] Tue, 04 January 2005 01:40 Go to next message
Xonk is currently offline  Xonk   Germany
Messages: 67
Registered: March 2004
Karma: 0
Member
I just tried the latest version.
The validation of the email-adress when a new user fills the registration-formular allows spaces.

Greets,

Sven
Re: Space ignored in eMail-Validation [message #21941 is a reply to message #21931] Tue, 04 January 2005 19:50 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I just tried it and "a @ a.com" was shown as invalid. I've also checked the regex responsible for this and it does not permit spaces anywhere.

FUDforum Core Developer
Re: Space ignored in eMail-Validation [message #22010 is a reply to message #21941] Sun, 09 January 2005 12:09 Go to previous messageGo to next message
Xonk is currently offline  Xonk   Germany
Messages: 67
Registered: March 2004
Karma: 0
Member
please try again with
a a(at)a(dot)com
.
Re: Space ignored in eMail-Validation [message #22019 is a reply to message #22010] Sun, 09 January 2005 17:00 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Aha I see, thanks.

Here is the fix:
--- iemail.inc.t        2005-01-09 10:58:19.000000000 -0600
+++ iemail.inc.t~       2005-01-09 10:58:19.000000000 -0600
@@ -12,7 +12,7 @@
 
 function validate_email($email)
 {
-        return !preg_match('!^([-_A-Za-z0-9\.]+)\@([-_A-Za-z0-9\.]+)\.([A-Za-z0-9]{2,4})$!', $email);
+        return !preg_match('!([-_A-Za-z0-9\.]+)\@([-_A-Za-z0-9\.]+)\.([A-Za-z0-9]{2,4})$!', $email);
 }
 
 function encode_subject($text)


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Thread Pruning not working on a 2.6.9 install.
Next Topic: pg_query() prepare issue
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 21:51:17 GMT 2024

Total time taken to generate the page: 0.02342 seconds