diff --git a/ChangeLog b/ChangeLog index 41a329a8f4..db8085b9c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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) diff --git a/libraries/TableSearch.class.php b/libraries/TableSearch.class.php index e5a400bbe5..ccc808eaab 100644 --- a/libraries/TableSearch.class.php +++ b/libraries/TableSearch.class.php @@ -591,8 +591,13 @@ EOT; . ' (' . 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