WordPress.org

Make WordPress Core

Changeset 40180 for branches/3.7


Ignore:
Timestamp:
03/06/2017 01:05:30 PM (4 years ago)
Author:
aaroncampbell
Message:

Plugins: Add file check to plugin deletions.

Merges [40169] to 3.7 branch.

Location:
branches/3.7
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.7

  • branches/3.7/src

  • branches/3.7/src/wp-admin/plugins.php

    r25616 r40180  
    218218            if ( empty( $plugins ) ) {
    219219                wp_redirect( self_admin_url( "plugins.php?error=true&main=true&plugin_status=$status&paged=$page&s=$s" ) );
     220                exit;
     221            }
     222
     223            // Bail on all if any paths are invalid.
     224            // validate_file() returns truthy for invalid files
     225            $invalid_plugin_files = array_filter( $plugins, 'validate_file' );
     226            if ( $invalid_plugin_files ) {
     227                wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
    220228                exit;
    221229            }
Note: See TracChangeset for help on using the changeset viewer.