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

Home » FUDforum Development » Bug Reports » Register.php rejecting email
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Register.php rejecting email [message #1395] Thu, 11 April 2002 21:12 Go to previous message
TimothyB is currently offline  TimothyB   United States
Messages: 2
Registered: April 2002
Karma:
Junior Member
We ran into a problem on one of our test machines here. Everytime a user would try to register, it would reject perfectly valid email addresses. I tracked this down to email.inc in the forum_data/include directory. I also found that the second regex does not seem to operate correctly in php. Works fine in perl. Was able to fix the offending regex by replacing the function used. The posix regex function returns a different answer than the perl regex function. So, with little to do, here is the diff:


@@ -21,7 +21,14 @@

function validate_email($email)
{
- if (eregi("(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)", $email) || !eregi ("^.+\@(\[?)[-_a-zA-Z0-9\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$", $email)) {
+/* Lines commented out to correct problem in register.php
+*
+* if (eregi("(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)", $email) || !eregi ("^.+\@(\[?)[-a-zA-Z0-9\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$", $email)) {
+*
+* Commented regex is BROKEN. Second regex of parse returns opposite
+* value of actual. Changed to perl regex matching.
+*/
+ if (eregi("(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)", $email) || !preg_match("/^.+\@[-_a-zA-Z0-9\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})$/" ;, $email)) {
return 1;
}
else {


This was with the new v1.2.4.

Regards,
Tim
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Error Log Viewer aborts
Next Topic: Empty Language list on Template Set Selection
Goto Forum:
  

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

Current Time: Fri Nov 01 22:56:38 GMT 2024

Total time taken to generate the page: 0.04028 seconds