From 2f6514cad3edb46ed3d934a62384a48c409359d4 Mon Sep 17 00:00:00 2001 From: Giovanni Bechis Date: Tue, 22 Oct 2024 17:42:17 +0200 Subject: [PATCH] lowercase $from_dom and $spf_dom variables Co-authored-by: Matt Simerson --- lib/Mail/DMARC/PurePerl.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Mail/DMARC/PurePerl.pm b/lib/Mail/DMARC/PurePerl.pm index 9c4bc776..496b776b 100644 --- a/lib/Mail/DMARC/PurePerl.pm +++ b/lib/Mail/DMARC/PurePerl.pm @@ -264,7 +264,8 @@ sub is_spf_aligned { $self->result->spf('fail'); return 0 if !$spf_dom; - my $from_dom = $self->header_from or croak "header_from not set!"; + my $from_dom = lc $self->header_from or croak "header_from not set!"; + $spf_dom = lc $spf_dom; if ( lc($spf_dom) eq lc($from_dom) ) { $self->result->spf('pass');