]> 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:51:00 +0000 (16:51 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 31 Jan 2012 15:51:00 +0000 (16:51 +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 c6b3abb31df283f663e7f418626feaeb1ecd04b5..5d75343889a64236cfc1ebdce62633dc793fb461 100644 (file)
@@ -623,7 +623,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 255fe723c8b4d7ac22216f1a1d893664d1a75748..81d51278271a502730f6d4fedc903d7ac4b9587c 100755 (executable)
@@ -587,7 +587,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 efb5de6f1d001749a72c9745ce3dfe4bfaad7fb5..47fa706a19eb70278291d9935cef7969f1cfe9c2 100644 (file)
@@ -58,8 +58,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 c7312a8036efac632982ea7e6f30923277acf6f6..a3bb7c8c312332bf1a1c002f13a04f2899f6eb9e 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