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
This commit is contained in:
Helen Hou-Sandí 2020-11-02 18:42:04 +00:00
parent cc74786052
commit 340c834fa3
2 changed files with 2 additions and 2 deletions

View File

@ -3773,7 +3773,7 @@ function wp_create_user_request( $email_address = '', $action_name = '', $reques
return new WP_Error( 'invalid_email', __( 'Invalid email address.' ) ); 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.' ) ); return new WP_Error( 'invalid_action', __( 'Invalid action name.' ) );
} }

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.