Changeset 1956

Show
Ignore:
Timestamp:
12/14/04 09:45:49 (4 years ago)
Author:
saxmatt
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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);