]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 714472: (CVE-2012-0448) [SECURITY] utf8 homoglyphs are allowed in email addresses...
authorFrédéric Buclin <LpSolit@gmail.com>
Tue, 31 Jan 2012 15:43:18 +0000 (16:43 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 31 Jan 2012 15:43:18 +0000 (16:43 +0100)
r=glob a=LpSolit

Bugzilla/Util.pm
editflagtypes.cgi
template/en/default/global/code-error.html.tmpl
template/en/default/global/user-error.html.tmpl

index 1129cb0ae659905759dacc5b78c96ce87650e267..224de591e77164412cf9ede0f813d1aa6c3cc6cf 100644 (file)
@@ -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]);
index c09d0edb040b3ae41cac2a7d42dd46f6d08b9e45..c017a1e13e3f39b5da3277548e09606d40ed3c56 100755 (executable)
@@ -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});
     }
index 6077bc474baec840c0cd45094a30d83147e7029d..a876bd2b7200e76e3f660e04b3e9d9b8656fab7c 100644 (file)
@@ -56,8 +56,7 @@
     [% ELSE %]
       [%+ Param('emailregexpdesc') FILTER html_light %]
     [% END %]
-    It must also not contain any of these special characters:
-    <tt>\ ( ) &amp; &lt; &gt; , ; : &quot; [ ]</tt>, 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
index 452d99eee9c9cf2bdb8499bb9702592d24e6a193..b4be5d86a67e215be46567cf7de04fac40e20e37 100644 (file)
     [% ELSE %]
       [%+ Param('emailregexpdesc') FILTER html_light %]
     [% END %]
-    It must also not contain any of these special characters:
-    <tt>\ ( ) &amp; &lt; &gt; , ; : &quot; [ ]</tt>, 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