Plugins: Add file check to plugin deletions.

git-svn-id: https://develop.svn.wordpress.org/trunk@40169 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Aaron D. Campbell 2017-03-06 12:54:07 +00:00
parent ccfe51c3b9
commit 4e13bc0bea
1 changed files with 8 additions and 0 deletions

View File

@ -246,6 +246,14 @@ if ( $action ) {
exit;
}
// Bail on all if any paths are invalid.
// validate_file() returns truthy for invalid files
$invalid_plugin_files = array_filter( $plugins, 'validate_file' );
if ( $invalid_plugin_files ) {
wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
exit;
}
include(ABSPATH . 'wp-admin/update.php');
$parent_file = 'plugins.php';