Skip to content

Commit

Permalink
Don't echo nonce fields; only render inside form
Browse files Browse the repository at this point in the history
  • Loading branch information
joedolson committed Dec 26, 2023
1 parent e662771 commit 8cf89ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mt-reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ function mt_choose_report_by_date() {
*/
function mt_email_purchasers() {
$selector = mt_select_events();
$nonce = wp_nonce_field( 'mt-email-purchasers', 'mt-email-nonce' );
$nonce = wp_nonce_field( 'mt-email-purchasers', 'mt-email-nonce', true, false );
$event_id = ( isset( $_GET['event_id'] ) ) ? (int) $_GET['event_id'] : false;
$body = ( isset( $_POST['mt_body'] ) ) ? sanitize_textarea_field( $_POST['mt_body'] ) : '';
$subject = ( isset( $_POST['mt_subject'] ) ) ? sanitize_text_field( $_POST['mt_subject'] ) : '';
Expand Down

0 comments on commit 8cf89ab

Please sign in to comment.