From abf236fdaf94455e7bc6e30980cf70401003e283 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Mon, 17 Oct 2022 11:00:27 +0000 Subject: [PATCH] Posts, Post types: Apply KSES to post-by-email content. Props voldemortensen, johnbillion, paulkevan, peterwilsoncc, xknown, dd32, audrasjb. git-svn-id: https://develop.svn.wordpress.org/trunk@54521 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-mail.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-mail.php b/src/wp-mail.php index d3a86352f2..794598d379 100644 --- a/src/wp-mail.php +++ b/src/wp-mail.php @@ -65,6 +65,9 @@ if ( 0 === $count ) { wp_die( __( 'There does not seem to be any new mail.' ) ); } +// Always run as an unauthenticated user. +wp_set_current_user( 0 ); + for ( $i = 1; $i <= $count; $i++ ) { $message = $pop3->get( $i );