From e09500e15816714ae4967613dee7e436c6868e13 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Thu, 26 Feb 2004 08:07:23 +0000 Subject: Patch for bug 65313; improves the email regexp in order to detect better invalid email addresses; r=gerv, a=justdave. --- checksetup.pl | 2 +- defparams.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/checksetup.pl b/checksetup.pl index 74151d87c..a6b673a60 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -3949,7 +3949,7 @@ if ($sth->rows == 0) { $mailcheckexp = Param('emailregexp'); $mailcheck = Param('emailregexpdesc'); } else { - $mailcheckexp = '^[^@]+@[^@]+\\.[^@]+$'; + $mailcheckexp = '^[\\w\\.\\+\\-=]+@[\\w\\.\\-]+\\.[\\w\\-]+$'; $mailcheck = 'A legal address must contain exactly one \'@\', and at least one \'.\' after the @.'; } diff --git a/defparams.pl b/defparams.pl index e6cb16ac8..1d492de20 100644 --- a/defparams.pl +++ b/defparams.pl @@ -739,7 +739,7 @@ You will get this message once a day until you\'ve dealt with these bugs! 'popular value to put here is ^[^@]+$, which means ' . '"local usernames, no @ allowed."', type => 't', - default => q:^[^@]+@[^@]+\\.[^@]+$:, + default => q:^[\\w\\.\\+\\-=]+@[\\w\\.\\-]+\\.[\\w\\-]+$:, checker => \&check_regexp }, -- cgit v1.2.3-24-g4f1b