Make WordPress Core

Changeset 1956


Ignore:
Timestamp:
12/14/2004 09:45:49 AM (21 years ago)
Author:
saxmatt
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/templates.php

    r1940 r1956  
    5252
    5353    require_once('./admin-header.php');
    54     if ($user_level <= 5) {
     54    if ( $user_level <= 5 )
    5555        die(__('<p>You have do not have sufficient permissions to edit templates for this blog.</p>'));
    56     }
     56
     57    if ( strstr( $file, 'wp-config.php' ) )
     58        die( __('<p>The config file cannot be edited or viewed through the web interface. Sorry!</p>') );
    5759
    5860    update_recently_edited($file);
Note: See TracChangeset for help on using the changeset viewer.