Close #717: Emails with .museum or .traveil were not allowed
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 8 Sep 2007 23:56:33 +0000 (01:56 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sat, 8 Sep 2007 23:56:33 +0000 (01:56 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
ChangeLog
include/platal.inc.php

index e37c52a..47b3242 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@ Bug/Wish:
     * Core:
         - #674: MiniWiki xhtml validation                                  -FRU
         - #678: PlUpload filename detection                                -FRU
+        - #717: Allow TLD with length up to 6 characters in emails         -FRU
 
     * Emails:
         - #687: Don't lose authentication when editing a long mail         -FRU
index 7ab9ef8..ad6bbe9 100644 (file)
@@ -134,7 +134,7 @@ function isvalid_email($email)
     // la rfc2822 authorise les caractères "a-z", "0-9", "!", "#", "$", "%", "&", "'", "*", "+", "-", "/", "=", "?", "^",  `", "{", "|", "}", "~" aussi bien dans la partie locale que dans le domaine.
     // Pour la partie locale, on réduit cet ensemble car il n'est pas utilisé.
     // Pour le domaine, le système DNS limite à [a-z0-9.-], on y ajoute le "_" car il est parfois utilisé.
-    return preg_match("/^[a-z0-9_.'+-]+@[a-z0-9._-]+\.[a-z]{2,4}$/i", $email);
+    return preg_match("/^[a-z0-9_.'+-]+@[a-z0-9._-]+\.[a-z]{2,6}$/i", $email);
 }
 
 function pl_url($path, $query = null, $fragment = null)