Permalink
Browse files

Merge pull request #231 from kasunchathuranga/Bug3865

Fix bug #3865 Using like operator on each backslash needs 4 backslash pr...
  • Loading branch information...
2 parents 6c60e5d + 22532c2 commit bff52d3944fcf6d387ba60d1b632dbb31281e7e4 @nijel nijel committed Apr 7, 2013
Showing with 8 additions and 2 deletions.
  1. +1 −0 ChangeLog
  2. +7 −2 libraries/TableSearch.class.php
View
@@ -103,6 +103,7 @@ underscore
+ rfe #1319 Permit to create index when creating foreign key
- bug #3703 Incorrect updating of the list of users
- bug #3853 Blowfish implementation might be broken (replace with phpseclib)
+- bug #3865 Using like operator on each backslash needs 4 backslash protection
3.5.9.0 (not yet released)
@@ -591,8 +591,13 @@ private function _getWhereClause($criteriaValues, $names, $types, $collations,
. ' (' . implode(',', $values) . ')';
}
} else {
- $where = $backquoted_name . ' ' . $func_type . ' ' . $quot
- . PMA_Util::sqlAddSlashes($criteriaValues) . $quot;
+ if ($func_type == 'LIKE %...%' || $func_type == 'LIKE') {
+ $where = $backquoted_name . ' ' . $func_type . ' ' . $quot
+ . PMA_Util::sqlAddSlashes($criteriaValues, true) . $quot;
+ } else {
+ $where = $backquoted_name . ' ' . $func_type . ' ' . $quot
+ . PMA_Util::sqlAddSlashes($criteriaValues) . $quot;
+ }
}
} // end if

0 comments on commit bff52d3

Please sign in to comment.