fixed "backslashed backslash" before wildcards problem in databases names
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2001-09-30 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
|
* libraries/common.lib.php3, lines 489-493: fixed "backslashed backslash"
|
||||||
|
before wildcards problem in databases names.
|
||||||
|
|
||||||
2001-09-29 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2001-09-29 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* libraries/common.lib.php3:
|
* libraries/common.lib.php3:
|
||||||
- fixed a possible problem with invalid keys values in the $uva_mydbs
|
- fixed a possible problem with invalid keys values in the $uva_mydbs
|
||||||
|
@@ -486,12 +486,11 @@ if (!defined('__LIB_COMMON__')){
|
|||||||
reset($uva_mydbs);
|
reset($uva_mydbs);
|
||||||
while (list($uva_matchpattern, $uva_value) = each($uva_mydbs)) {
|
while (list($uva_matchpattern, $uva_value) = each($uva_mydbs)) {
|
||||||
// loic1: fixed bad regexp
|
// loic1: fixed bad regexp
|
||||||
// TODO: - slash before wildcards
|
// TODO: db names may contain
|
||||||
// may be itself slashed
|
// characters that are regexp
|
||||||
// - db names may contain
|
// instructions
|
||||||
// characters that are
|
$re = '(^|(\\\\\\\\)+|[^\])';
|
||||||
// regexp instructions
|
$uva_regex = ereg_replace($re . '%', '\\1.*', ereg_replace($re . '_', '\\1.{1}', $uva_value));
|
||||||
$uva_regex = ereg_replace('[^\]%', '.*', ereg_replace('[^\]_', '.{1}', $uva_value));
|
|
||||||
// Fixed db name matching
|
// Fixed db name matching
|
||||||
// 2000-08-28 -- Benjamin Gandon
|
// 2000-08-28 -- Benjamin Gandon
|
||||||
if (ereg('^' . $uva_regex . '$', $uva_row[0])) {
|
if (ereg('^' . $uva_regex . '$', $uva_row[0])) {
|
||||||
|
Reference in New Issue
Block a user