From 644632bec5f71e14a7bf601cbf042f658eb49400 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 29 Sep 2015 17:26:44 +0000 Subject: [PATCH] Revert the introduction of validation of the comment author's email address when sanity checking input in `wp-comments-post.php` (introduced in r34274). This allows a problematic email address to fall through to the correct validation routine and show the "Please enter a valid email address" as expected. Fixes #23416 git-svn-id: https://develop.svn.wordpress.org/trunk@34693 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-comments-post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-comments-post.php b/src/wp-comments-post.php index cb7bd50fa4..59e8123f39 100644 --- a/src/wp-comments-post.php +++ b/src/wp-comments-post.php @@ -90,7 +90,7 @@ if ( ! comments_open( $comment_post_ID ) ) { } $comment_author = ( isset( $_POST['author'] ) && is_string( $_POST['author'] ) ) ? trim( strip_tags( $_POST['author'] ) ) : null; -$comment_author_email = ( isset( $_POST['email'] ) && is_email( $_POST['email'] ) ) ? trim( $_POST['email'] ) : null; +$comment_author_email = ( isset( $_POST['email'] ) && is_string( $_POST['email'] ) ) ? trim( $_POST['email'] ) : null; $comment_author_url = ( isset( $_POST['url'] ) && is_string( $_POST['url'] ) ) ? trim( $_POST['url'] ) : null; $comment_content = ( isset( $_POST['comment'] ) && is_string( $_POST['comment'] ) ) ? trim( $_POST['comment'] ) : null;