]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 163890: editusers.cgi incorrectly treats "_" (underscore) as a wildcard
authorSunil Joshi <joshi_sunil@in.com>
Sun, 14 Oct 2012 18:04:21 +0000 (20:04 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Sun, 14 Oct 2012 18:04:21 +0000 (20:04 +0200)
r/a=LpSolit

editusers.cgi

index e2675921bdc0c1689ff471df2f8f9ad76b8bba33..4fca85daa05faa89e03ddcb1e9bd260a234958e8 100755 (executable)
@@ -145,8 +145,7 @@ if ($action eq 'search') {
             } elsif ($matchtype eq 'exact') {
                 $query .= $expr . ' = ?';
             } else { # substr or unknown
-                $query .= $dbh->sql_istrcmp($expr, '?', 'LIKE');
-                $matchstr = "%$matchstr%";
+                $query .= $dbh->sql_iposition('?', $expr) . ' > 0';
             }
             $nextCondition = 'AND';
             push(@bindValues, $matchstr);