Make WordPress Core

Changeset 40171


Ignore:
Timestamp:
03/06/2017 12:58:50 PM (8 years ago)
Author:
aaroncampbell
Message:

Plugins: Add file check to plugin deletions.

Merges [40169] to 4.6 branch.

Location:
branches/4.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.6

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

    r38072 r40171  
    244244            if ( empty( $plugins ) ) {
    245245                wp_redirect( self_admin_url( "plugins.php?error=true&main=true&plugin_status=$status&paged=$page&s=$s" ) );
     246                exit;
     247            }
     248
     249            // Bail on all if any paths are invalid.
     250            // validate_file() returns truthy for invalid files
     251            $invalid_plugin_files = array_filter( $plugins, 'validate_file' );
     252            if ( $invalid_plugin_files ) {
     253                wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
    246254                exit;
    247255            }
Note: See TracChangeset for help on using the changeset viewer.