From: Frédéric Buclin Date: Tue, 31 Jan 2012 15:43:18 +0000 (+0100) Subject: Bug 714472: (CVE-2012-0448) [SECURITY] utf8 homoglyphs are allowed in email addresses... X-Git-Tag: bugzilla-4.0.4~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e52527fce4f2b05b0eafc5c8becb7828fe00e9c;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 1129cb0ae6..224de591e7 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -600,7 +600,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 c09d0edb04..c017a1e13e 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -583,7 +583,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 6077bc474b..a876bd2b72 100644 --- a/template/en/default/global/code-error.html.tmpl +++ b/template/en/default/global/code-error.html.tmpl @@ -56,8 +56,7 @@ [% ELSE %] [%+ Param('emailregexpdesc') FILTER html_light %] [% 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 452d99eee9..b4be5d86a6 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -831,9 +831,8 @@ [% ELSE %] [%+ Param('emailregexpdesc') FILTER html_light %] [% 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