]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 533018: "Confirm match" displays full email address to logged-out users in reques...
authorFrédéric Buclin <LpSolit@gmail.com>
Thu, 18 Feb 2010 00:16:31 +0000 (01:16 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 18 Feb 2010 00:16:31 +0000 (01:16 +0100)
r/a=mkanat

Bugzilla/User.pm
template/en/default/global/confirm-user-match.html.tmpl

index e0c5b132f9b0ff275aa1635bbc972a4a8388ec22..b8d2aaa6f8d378f146c86d7d8afa97c08d5382f2 100644 (file)
@@ -1066,7 +1066,8 @@ sub match {
     # first try wildcards
     my $wildstr = $str;
 
-    if ($wildstr =~ s/\*/\%/g) { # don't do wildcards if no '*' in the string
+    # Do not do wildcards if there is no '*' in the string.
+    if ($wildstr =~ s/\*/\%/g && $user->id) {
         # Build the query.
         trick_taint($wildstr);
         my $query  = "SELECT DISTINCT userid FROM profiles ";
@@ -1101,7 +1102,7 @@ sub match {
     }
 
     # then try substring search
-    if (!scalar(@users) && length($str) >= 3) {
+    if (!scalar(@users) && length($str) >= 3 && $user->id) {
         trick_taint($str);
 
         my $query   = "SELECT DISTINCT userid FROM profiles ";
index 40dccc6b57a84e64c0655ab7d4ab7aaa541efbbc..67a901f0e3206a3b59500ec2857b3cb298ee0d07 100644 (file)
@@ -57,7 +57,7 @@
 [% IF matchsuccess == 1 %]
   [% PROCESS global/header.html.tmpl title="Confirm Match" %]
 
-[% USE Bugzilla %]
+  [% USE Bugzilla %]
 
   <form method="post" 
   [% IF script -%]
   [% PROCESS global/header.html.tmpl title="Match Failed" %]
   <p>
     [% terms.Bugzilla %] was unable to make any match at all for one or more of
-    the names and/or email addresses you entered on the previous page.<br>
-    Please go back and try other names or email addresses.
+    the names and/or email addresses you entered on the previous page.
+    [% IF !user.id %]
+      <b>Note: You are currently logged out. Only exact matches against e-mail
+      addresses will be performed.</b>
+    [% END %]
   </p>
+  <p>Please go back and try other names or email addresses.</p>
 [% END %]
 
   <table border="0">