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