From a1dc0cfa3fe0c9cf226c24b1e906bfa2a678104e Mon Sep 17 00:00:00 2001 From: Jake Spurlock Date: Tue, 23 Jun 2020 22:56:10 +0000 Subject: [PATCH] Security: Don't display the plugin auto-update options for mu-plugins or dropins. They can't be updated, so we shouldn't be showing the buttons. Fixes #50459. Props Chouby, audrasjb, pbiron. git-svn-id: https://develop.svn.wordpress.org/trunk@48149 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-plugins-list-table.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php index b2b74d65db..f59ece0bc1 100644 --- a/src/wp-admin/includes/class-wp-plugins-list-table.php +++ b/src/wp-admin/includes/class-wp-plugins-list-table.php @@ -60,9 +60,10 @@ class WP_Plugins_List_Table extends WP_List_Table { $page = $this->get_pagenum(); - $this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'plugin' ) && - current_user_can( 'update_plugins' ) && - ( ! is_multisite() || $this->screen->in_admin( 'network' ) ); + $this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'plugin' ) + && current_user_can( 'update_plugins' ) + && ( ! is_multisite() || $this->screen->in_admin( 'network' ) ) + && ! in_array( $status, array( 'mustuse', 'dropins' ), true ); } /**