diff --git a/includes/Main.php b/includes/Main.php index fe4574851..7191b6ec5 100644 --- a/includes/Main.php +++ b/includes/Main.php @@ -886,7 +886,7 @@ public function requirement_missing_notice(): void { // Handle dismissal action if ( isset( $_GET['wpo_dismiss_requirements_notice'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended - if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], 'dismiss_requirements_notice' ) ) { + if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ), 'dismiss_requirements_notice' ) ) { update_option( 'wpo_wcpdf_dismiss_requirements_notice', true ); wp_redirect( remove_query_arg( array( 'wpo_dismiss_requirements_notice', '_wpnonce' ) ) ); exit;