From 79daf8feaaf6505c7be79197151602c5f1f508be Mon Sep 17 00:00:00 2001 From: frytimo Date: Tue, 17 Sep 2019 14:39:31 -0400 Subject: [PATCH] Match mixed case in "from" address (#4618) RFC's do not specify addresses must be converted lower case by email servers. If a sender has set their "from" address set to a mixed case string, the fax send will not match the authorized senders. This corrects that by changing authorized senders list to lower case before the comparison is done. --- app/fax/fax_emails.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/fax/fax_emails.php b/app/fax/fax_emails.php index bd0700923d..943e6516b4 100644 --- a/app/fax/fax_emails.php +++ b/app/fax/fax_emails.php @@ -94,7 +94,7 @@ if (is_array($result) && @sizeof($result) != 0) { $fax_email_connection_password = $row["fax_email_connection_password"]; $fax_email_connection_mailbox = $row["fax_email_connection_mailbox"]; $fax_email_outbound_subject_tag = $row["fax_email_outbound_subject_tag"]; - $fax_email_outbound_authorized_senders = $row["fax_email_outbound_authorized_senders"]; + $fax_email_outbound_authorized_senders = strtolower($row["fax_email_outbound_authorized_senders"]); $fax_send_greeting = $row["fax_send_greeting"]; $fax_accountcode = $row["accountcode"]; @@ -167,7 +167,7 @@ if (is_array($result) && @sizeof($result) != 0) { //format from address $tmp = object_to_array(imap_rfc822_parse_adrlist($metadata[0]['from'], null)); - $metadata[0]['from'] = $tmp[0]['mailbox']."@".$tmp[0]['host']; + $metadata[0]['from'] = strtolower($tmp[0]['mailbox']."@".$tmp[0]['host']); //check sender $sender_authorized = false;