diff --git a/wp-includes/rest-api.php b/wp-includes/rest-api.php index 8642460dd8..d59f570c02 100644 --- a/wp-includes/rest-api.php +++ b/wp-includes/rest-api.php @@ -1036,7 +1036,11 @@ function rest_validate_value_from_schema( $value, $args, $param = '' ) { break; case 'email' : - if ( ! is_email( $value ) ) { + // is_email() checks for 3 characters (a@b), but + // wp_handle_comment_submission() requires 6 characters (a@b.co) + // + // https://core.trac.wordpress.org/ticket/38506 + if ( ! is_email( $value ) || strlen( $value ) < 6 ) { return new WP_Error( 'rest_invalid_email', __( 'The email address you provided is invalid.' ) ); } break; diff --git a/wp-includes/version.php b/wp-includes/version.php index 43e8292d0d..040b966d1c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta2-39157'; +$wp_version = '4.7-beta2-39158'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.