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

git-svn-id: https://develop.svn.wordpress.org/trunk@1956 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2004-12-14 09:45:49 +00:00
parent 4157281a2d
commit c1676ef38e

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);