added check is_readable for user config file
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2005-12-14 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||||
|
* libraries/Config.class.php: added check is_readable for user config file
|
||||||
|
|
||||||
2005-12-14 Michal Čihař <michal@cihar.com>
|
2005-12-14 Michal Čihař <michal@cihar.com>
|
||||||
* libraries/config.default.php, Documentation.html: Transliterate invalid
|
* libraries/config.default.php, Documentation.html: Transliterate invalid
|
||||||
chars by default (RFE #1380255).
|
chars by default (RFE #1380255).
|
||||||
|
@@ -382,6 +382,10 @@ class PMA_Config
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! is_readable($source) ) {
|
||||||
|
die('Existing configuration file (' . $source . ') is not readable.');
|
||||||
|
}
|
||||||
|
|
||||||
// Check for permissions (on platforms that support it):
|
// Check for permissions (on platforms that support it):
|
||||||
$perms = @stat($source);
|
$perms = @stat($source);
|
||||||
if (!($perms === FALSE) && ($perms['mode'] & 2)) {
|
if (!($perms === FALSE) && ($perms['mode'] & 2)) {
|
||||||
@@ -390,9 +394,9 @@ class PMA_Config
|
|||||||
|
|
||||||
// Refuse to work while there still might be some world writable dir:
|
// Refuse to work while there still might be some world writable dir:
|
||||||
if (is_dir('./config')) {
|
if (is_dir('./config')) {
|
||||||
die('Remove config directory before using phpMyAdmin!');
|
die('Remove "./config" directory before using phpMyAdmin!');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->source = trim($source);
|
$this->source = trim($source);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user