Don't allow viewing/editing of wp-config.php through web interface.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-12-14 09:45:49 +00:00
parent 0d040b307f
commit ed31b29e05

View File

@ -51,9 +51,11 @@ break;
default:
require_once('./admin-header.php');
if ($user_level <= 5) {
if ( $user_level <= 5 )
die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
}
if ( strstr( $file, 'wp-config.php' ) )
die( __('<p>The config file cannot be edited or viewed through the web interface. Sorry!</p>') );
update_recently_edited($file);