From 340c834fa347847e68cc58ba5ac6c65d4130437f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helen=20Hou-Sand=C3=AD?= Date: Mon, 2 Nov 2020 18:42:04 +0000 Subject: [PATCH] Privacy: More precise checking of user request action names. Props garrett-eclipse. Fixes #46536. Built from https://develop.svn.wordpress.org/trunk@49475 git-svn-id: http://core.svn.wordpress.org/trunk@49234 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/user.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index 0c207116e4..4418381185 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -3773,7 +3773,7 @@ function wp_create_user_request( $email_address = '', $action_name = '', $reques return new WP_Error( 'invalid_email', __( 'Invalid email address.' ) ); } - if ( ! $action_name ) { + if ( ! in_array( $action_name, _wp_privacy_action_request_types(), true ) ) { return new WP_Error( 'invalid_action', __( 'Invalid action name.' ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index e748b76699..3ad015f0c1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-beta2-49474'; +$wp_version = '5.6-beta2-49475'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.