From: SourceForge.net <no...@so...> - 2011-11-07 21:09:18
|
Bugs item #1988039, was opened at 2008-06-08 03:27 Message generated for change (Settings changed) made by trabis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=1988039&group_id=41586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core - Core Group: XOOPS 2.5.x >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: trabis (trabis) Summary: does not accept some valid email addresses Initial Comment: Upon trying to register some email address, for example, an email address containing the plus symbol, xoops reports that the email address is invalid. According to SMTP RFCs plus symbols, along with others, are valid. ---------------------------------------------------------------------- Comment By: trabis (trabis) Date: 2011-09-16 12:38 Message: Fixed in SVN and waiting for review ---------------------------------------------------------------------- Comment By: anderssk (anderssk) Date: 2009-08-06 11:54 Message: Surgestion for replacementcode Also checks that there no more that 64 characters before @-sign and no more than 255 after. function checkEmail($email, $antispam = false) { if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { } $email_array = explode("@", $email); $local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if (!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%& ↪'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])) { return false; } } if (!ereg("^\[?[0-9\.]+\]?$", $email_array[1])) { $domain_array = explode(".", $email_array[1]); if (sizeof($domain_array) < 2) { return false; // Not enough parts to domain } for ($i = 0; $i < sizeof($domain_array); $i++) { if (!ereg("^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])| ↪([A-Za-z0-9]+))$", $domain_array[$i])) { return false; } } } if ($antispam) { $email = str_replace("@", " at ", $email); $email = str_replace(".", " dot ", $email); } return $email; } ---------------------------------------------------------------------- Comment By: anderssk (anderssk) Date: 2009-08-06 11:52 Message: old code from include/functions.php function checkEmail($email, $antispam = false) { if (!$email || !preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i", $email)){ return false; } if ($antispam) { $email = str_replace("@", " at ", $email); $email = str_replace(".", " dot ", $email); } return $email; } ---------------------------------------------------------------------- Comment By: anderssk (anderssk) Date: 2009-04-13 04:30 Message: confirmed. The "+" sign is allowed in Emai, but You can't registrer in XOOPS 2.3.3 with that. ---------------------------------------------------------------------- Comment By: R E Broadley (rebroad) Date: 2008-06-08 03:37 Message: Logged In: YES user_id=1254951 Originator: NO Can confirm this problem exists. See http://www.uk-poly.net/register.php as an example where plus symbol is not accepted. Unsure of version of XOOPS however. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=430840&aid=1988039&group_id=41586 |