From: Frédéric Buclin Date: Tue, 31 Jan 2012 15:48:13 +0000 (+0100) Subject: Bug 714472: (CVE-2012-0448) [SECURITY] utf8 homoglyphs are allowed in email addresses... X-Git-Tag: bugzilla-3.6.8~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b169175d86a34b9f2151dde8d169fdc75707dd55;p=thirdparty%2Fbugzilla.git Bug 714472: (CVE-2012-0448) [SECURITY] utf8 homoglyphs are allowed in email addresses, which could allow an attacker to be CC'ed to private bugs by accident r=glob a=LpSolit --- diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 074b8fefdc..285fb32b73 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -606,7 +606,7 @@ sub _do_srand { sub validate_email_syntax { my ($addr) = @_; my $match = Bugzilla->params->{'emailregexp'}; - my $ret = ($addr =~ /$match/ && $addr !~ /[\\\(\)<>&,;:"\[\] \t\r\n]/); + my $ret = ($addr =~ /$match/ && $addr !~ /[\\\(\)<>&,;:"\[\] \t\r\n\P{ASCII}]/); if ($ret) { # We assume these checks to suffice to consider the address untainted. trick_taint($_[0]); diff --git a/editflagtypes.cgi b/editflagtypes.cgi index 4f85e6c65e..5b0b708bc7 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -579,7 +579,7 @@ sub validateCCList { # - do not contain any illegal character. foreach my $address (@addresses) { ($address =~ /^[\w\.\+\-=]+@[\w\.\-]+\.[\w\-]+$/ - && $address !~ /[\\\(\)<>&,;:"\[\] \t\r\n]/) + && $address !~ /[\\\(\)<>&,;:"\[\] \t\r\n\P{ASCII}]/) || ThrowUserError('illegal_email_address', {addr => $address, default => 1}); } diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl index e70f5b2a67..3db03fca4a 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -66,8 +66,7 @@ [% ELSE %] [%+ Param('emailregexpdesc') %] [% END %] - It must also not contain any of these special characters: - \ ( ) & < > , ; : " [ ], or any whitespace. + It also must not contain any illegal characters. [% ELSIF error == "authres_unhandled" %] The result value of [% value FILTER html %] was not handled by diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 39e5d42f77..76531a2403 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -830,9 +830,8 @@ [% ELSE %] [%+ Param('emailregexpdesc') %] [% END %] - It must also not contain any of these special characters: - \ ( ) & < > , ; : " [ ], or any whitespace. - + It also must not contain any illegal characters. + [% ELSIF error == "illegal_frequency" %] [% title = "Too Frequent" %] Unless you are an administrator, you may not create series which are