From ef95d5ceeec1654f5fe685b4e2c9636fa30dd4f2 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Buclin?=
Date: Thu, 18 Feb 2010 01:19:45 +0100
Subject: [PATCH] Bug 533018: "Confirm match" displays full email address to
logged-out users in request.cgi r/a=mkanat
---
Bugzilla/User.pm | 2 ++
.../en/default/global/confirm-user-match.html.tmpl | 10 +++++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 2ae12efcc3..b55313c6d0 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -1026,6 +1026,7 @@ sub match {
my $wildstr = $str;
if ($wildstr =~ s/\*/\%/g # don't do wildcards if no '*' in the string
+ && $user->id
# or if we only want exact matches
&& Bugzilla->params->{'usermatchmode'} ne 'off')
{
@@ -1068,6 +1069,7 @@ sub match {
# then try substring search
if ((scalar(@users) == 0)
+ && $user->id
&& (Bugzilla->params->{'usermatchmode'} eq 'search')
&& (length($str) >= 3))
{
diff --git a/template/en/default/global/confirm-user-match.html.tmpl b/template/en/default/global/confirm-user-match.html.tmpl
index 5b209dfce8..52607614c5 100644
--- a/template/en/default/global/confirm-user-match.html.tmpl
+++ b/template/en/default/global/confirm-user-match.html.tmpl
@@ -41,7 +41,7 @@
[% IF matchsuccess == 1 %]
[% PROCESS global/header.html.tmpl title="Confirm Match" %]
-[% USE Bugzilla %]
+ [% USE Bugzilla %]
+ Please go back and try other names or email addresses.
[% END %]