From b86a9d09a129d63f96572b285839584ce402d5ce Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Mon, 30 Jun 2008 02:59:56 +0000 Subject: Bug 442582: Use sql_iposition instead of sql_position(lc($var), LOWER($var)) in Bugzilla::User::match Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- Bugzilla/User.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Bugzilla/User.pm') diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 5f9e2228c..3e609aef2 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -1067,7 +1067,6 @@ sub match { && (Bugzilla->params->{'usermatchmode'} eq 'search') && (length($str) >= 3)) { - $str = lc($str); trick_taint($str); my $query = "SELECT DISTINCT login_name FROM profiles "; @@ -1076,8 +1075,8 @@ sub match { ON user_group_map.user_id = profiles.userid "; } $query .= " WHERE (" . - $dbh->sql_position('?', 'LOWER(login_name)') . " > 0" . " OR " . - $dbh->sql_position('?', 'LOWER(realname)') . " > 0) "; + $dbh->sql_iposition('?', 'login_name') . " > 0" . " OR " . + $dbh->sql_iposition('?', 'realname') . " > 0) "; if (Bugzilla->params->{'usevisibilitygroups'}) { $query .= " AND isbless = 0" . " AND group_id IN(" . -- cgit v1.2.3-24-g4f1b