]> 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:39:50 +0000 (16:39 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 31 Jan 2012 15:39:50 +0000 (16:39 +0100)
r=glob a=LpSolit

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

index ea81dfe467f1abd2816143ae49e859e5910adeca..b30065a1cf70bc56ebbfa18a3051edb986b4d608 100644 (file)
@@ -310,7 +310,7 @@ sub _check_cc_list {
     # - 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 4c268552b4c4830a4361246022957916a0653225..6d8622e0436472fb222b9aca8944cee979aea5ad 100644 (file)
@@ -565,7 +565,7 @@ sub generate_random_password {
 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 5dce1697689efdef081ff25bfe87886b2730dd10..f100df994e5176afba3fa24ac4ca9e2243cdc18e 100644 (file)
@@ -48,8 +48,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 723f92042625ec697423491f2b8e28942becdb8e..dc0a94ac7f72319a580f817a858909285ad6dcf0 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