From 32111f706bcbf1d3244f64b7928b37bbc5210ab0 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sun, 9 Sep 2007 01:56:33 +0200 Subject: [PATCH] Close #717: Emails with .museum or .traveil were not allowed Signed-off-by: Florent Bruneau --- ChangeLog | 1 + include/platal.inc.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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) -- 2.1.4