From: Florent Bruneau Date: Sat, 8 Sep 2007 23:56:33 +0000 (+0200) Subject: Close #717: Emails with .museum or .traveil were not allowed X-Git-Tag: xorg/0.9.15~175 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=32111f706bcbf1d3244f64b7928b37bbc5210ab0;p=platal.git Close #717: Emails with .museum or .traveil were not allowed Signed-off-by: Florent Bruneau --- diff --git a/ChangeLog b/ChangeLog index e37c52a..47b3242 100644 --- 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 diff --git a/include/platal.inc.php b/include/platal.inc.php index 7ab9ef8..ad6bbe9 100644 --- a/include/platal.inc.php +++ b/include/platal.inc.php @@ -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)