Merge pull request #23356 from leonaves/patch-1

Fix security check on email template preview page.
This commit is contained in:
Mike Jolley 2019-04-18 10:51:01 +01:00 committed by GitHub
commit e64e927aab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -204,7 +204,7 @@ class WC_Admin {
public function preview_emails() { public function preview_emails() {
if ( isset( $_GET['preview_woocommerce_mail'] ) ) { if ( isset( $_GET['preview_woocommerce_mail'] ) ) {
if ( ! ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'], 'preview-mail' ) ) ) ) ) { if ( ! ( isset( $_REQUEST['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_REQUEST['_wpnonce'] ) ), 'preview-mail' ) ) ) {
die( 'Security check' ); die( 'Security check' );
} }