]> 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:48:13 +0000 (16:48 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 31 Jan 2012 15:48:13 +0000 (16:48 +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 074b8fefdc2c8192e7ffe2655601598b7c056fe6..285fb32b73f21cdfa0fd6492a2317477c3454cc3 100644 (file)
@@ -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]);
index 4f85e6c65ea2499fc2bf3612b1cba69195ed8e0d..5b0b708bc721bc0dd5f8935f9f05270d5f133b15 100755 (executable)
@@ -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});
     }
index e70f5b2a6771f3ef93af074fe013a678f5fa3018..3db03fca4a1915cfc6bf4a5314042850594ac2d4 100644 (file)
@@ -66,8 +66,7 @@
     [% ELSE %]
       [%+ Param('emailregexpdesc') %]
     [% 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 39e5d42f77eaf9c8097a47c10724353874345360..76531a24039787df823b9f1ee6c7f50f2afea8bb 100644 (file)
     [% ELSE %]
       [%+ Param('emailregexpdesc') %]
     [% 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