Skip to content

Commit 4d80f8b

Browse files
committed
Plugins: Add file check to plugin deletions.
Built from https://develop.svn.wordpress.org/trunk@40169 git-svn-id: http://core.svn.wordpress.org/trunk@40108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 419c8d9 commit 4d80f8b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Diff for: wp-admin/plugins.php

+8
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,14 @@
246246
exit;
247247
}
248248

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") );
254+
exit;
255+
}
256+
249257
include(ABSPATH . 'wp-admin/update.php');
250258

251259
$parent_file = 'plugins.php';

Diff for: wp-includes/version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @global string $wp_version
66
*/
7-
$wp_version = '4.8-alpha-40160';
7+
$wp_version = '4.8-alpha-40169';
88

99
/**
1010
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

0 commit comments

Comments
 (0)