fixed bug #472209 (Login password bug if magic_quotes_gpc is set)

This commit is contained in:
Loïc Chapeaux
2001-10-17 20:49:52 +00:00
parent 393cd06e7d
commit a90a46877e
2 changed files with 12 additions and 4 deletions

View File

@@ -12,8 +12,10 @@ $Source$
* Documentation.html, lines 766-770: added a link to the official MySQL
documentation for the "socket error" problems.
* index.php3, line 53; lang/*: out-sourced the "no frame" sentence.
* libraries/common.lib.php3: improved compatibility with the old phpMyAdmin
configuration file.
* libraries/common.lib.php3:
- improved compatibility with the old phpMyAdmin configuration file;
- lines 427-434: fixed bug #472209 (Login password bug if
magic_quotes_gpc is set.
* tbl_properties.php3, line 1243: added a param. to enforce reloading of
the left frame after a flush if $cfgShowTooltip is set to 1.
* tbl_change.php3: fixed some inconcistancies if an update is required but

View File

@@ -424,8 +424,14 @@ if (!defined('__LIB_COMMON__')){
@ini_set('track_errors', $bkp_track_err);
}
$PHP_AUTH_USER = str_replace('\'', '\\\'', $PHP_AUTH_USER);
$PHP_AUTH_PW = str_replace('\'', '\\\'', $PHP_AUTH_PW);
if (get_magic_quotes_gpc()) {
$PHP_AUTH_USER = str_replace('\\"', '"', str_replace('\\\\', '\\', $PHP_AUTH_USER));
$PHP_AUTH_PW = str_replace('\\"', '"', str_replace('\\\\', '\\', $PHP_AUTH_PW));
} else {
$PHP_AUTH_USER = str_replace('\'', '\\\'', $PHP_AUTH_USER);
$PHP_AUTH_PW = str_replace('\'', '\\\'', $PHP_AUTH_PW);
}
$auth_query = 'SELECT User, Password, Select_priv '
. 'FROM mysql.user '
. 'WHERE '