From 5d8b0567985c606eb5235008d7e999ce0417b811 Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Mon, 28 Mar 2022 14:17:29 -0700 Subject: [PATCH] Manage Pledge: Normalize addresses to lowercase for comparison. Fixes #141 --- plugins/wporg-5ftf/includes/endpoints.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/wporg-5ftf/includes/endpoints.php b/plugins/wporg-5ftf/includes/endpoints.php index f51601c..1611584 100644 --- a/plugins/wporg-5ftf/includes/endpoints.php +++ b/plugins/wporg-5ftf/includes/endpoints.php @@ -92,8 +92,8 @@ function send_manage_email_handler() { check_ajax_referer( 'send-manage-email', '_ajax_nonce' ); $pledge_id = filter_input( INPUT_POST, 'pledge_id', FILTER_VALIDATE_INT ); - $email = filter_input( INPUT_POST, 'email', FILTER_VALIDATE_EMAIL ); - $valid_email = get_post( $pledge_id )->{ META_PREFIX . 'org-pledge-email' }; + $email = strtolower( filter_input( INPUT_POST, 'email', FILTER_VALIDATE_EMAIL ) ); + $valid_email = strtolower( get_post( $pledge_id )->{ META_PREFIX . 'org-pledge-email' } ); if ( $valid_email && $valid_email === $email ) { $message_sent = Email\send_manage_pledge_link( $pledge_id );