Commit b86a9d09 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 442582: Use sql_iposition instead of sql_position(lc($var), LOWER($var)) in…

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
parent c1ca8605
......@@ -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(" .
......
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