summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-06-30 04:59:56 +0200
committermkanat%bugzilla.org <>2008-06-30 04:59:56 +0200
commitb86a9d09a129d63f96572b285839584ce402d5ce (patch)
tree7142911792009a493d7ad01e34051936d4baa481
parentc1ca86053ed276aa05eac8468cea61785629ac5e (diff)
downloadbugzilla-b86a9d09a129d63f96572b285839584ce402d5ce.tar.gz
bugzilla-b86a9d09a129d63f96572b285839584ce402d5ce.tar.xz
Bug 442582: Use sql_iposition instead of sql_position(lc($var), LOWER($var)) in Bugzilla::User::match
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
-rw-r--r--Bugzilla/User.pm5
1 files changed, 2 insertions, 3 deletions
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(" .