Commit 9e044b55 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 533018: "Confirm match" displays full email address to logged-out users in request.cgi

r/a=mkanat
parent 56cb0704
...@@ -1066,7 +1066,8 @@ sub match { ...@@ -1066,7 +1066,8 @@ sub match {
# first try wildcards # first try wildcards
my $wildstr = $str; 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. # Build the query.
trick_taint($wildstr); trick_taint($wildstr);
my $query = "SELECT DISTINCT userid FROM profiles "; my $query = "SELECT DISTINCT userid FROM profiles ";
...@@ -1101,7 +1102,7 @@ sub match { ...@@ -1101,7 +1102,7 @@ sub match {
} }
# then try substring search # then try substring search
if (!scalar(@users) && length($str) >= 3) { if (!scalar(@users) && length($str) >= 3 && $user->id) {
trick_taint($str); trick_taint($str);
my $query = "SELECT DISTINCT userid FROM profiles "; my $query = "SELECT DISTINCT userid FROM profiles ";
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
[% IF matchsuccess == 1 %] [% IF matchsuccess == 1 %]
[% PROCESS global/header.html.tmpl title="Confirm Match" %] [% PROCESS global/header.html.tmpl title="Confirm Match" %]
[% USE Bugzilla %] [% USE Bugzilla %]
<form method="post" <form method="post"
[% IF script -%] [% IF script -%]
...@@ -86,9 +86,13 @@ ...@@ -86,9 +86,13 @@
[% PROCESS global/header.html.tmpl title="Match Failed" %] [% PROCESS global/header.html.tmpl title="Match Failed" %]
<p> <p>
[% terms.Bugzilla %] was unable to make any match at all for one or more of [% 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> the names and/or email addresses you entered on the previous page.
Please go back and try other names or email addresses. [% IF !user.id %]
<b>Note: You are currently logged out. Only exact matches against e-mail
addresses will be performed.</b>
[% END %]
</p> </p>
<p>Please go back and try other names or email addresses.</p>
[% END %] [% END %]
<table border="0"> <table border="0">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment