From 517f6501dfd63e45c6c4d1b38726dd63da17c825 Mon Sep 17 00:00:00 2001 From: whyisjake Date: Tue, 23 Jun 2020 22:58:09 +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. Built from https://develop.svn.wordpress.org/trunk@48149 git-svn-id: http://core.svn.wordpress.org/trunk@47918 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-plugins-list-table.php | 7 ++++--- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index b2b74d65db..f59ece0bc1 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/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 ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 886a8b457b..b71e32fc60 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-48148'; +$wp_version = '5.5-alpha-48149'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.