File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -45,19 +45,19 @@ sub source_ip {
4545
4646sub envelope_to {
4747 return $_ [0]-> {envelope_to } if 1 == scalar @_ ;
48- croak " invalid envelope_to" if !$_ [0]-> is_valid_domain( $_ [1] );
48+ croak " invalid envelope_to" if !$_ [0]-> is_valid_domain( lc $_ [1] );
4949 return $_ [0]-> {envelope_to } = $_ [1];
5050}
5151
5252sub envelope_from {
5353 return $_ [0]-> {envelope_from } if 1 == scalar @_ ;
54- croak " invalid envelope_from" if !$_ [0]-> is_valid_domain( $_ [1] );
54+ croak " invalid envelope_from" if !$_ [0]-> is_valid_domain( lc $_ [1] );
5555 return $_ [0]-> {envelope_from } = $_ [1];
5656}
5757
5858sub header_from {
5959 return $_ [0]-> {header_from } if 1 == scalar @_ ;
60- croak " invalid header_from" if !$_ [0]-> is_valid_domain( $_ [1] );
60+ croak " invalid header_from" if !$_ [0]-> is_valid_domain( lc $_ [1] );
6161 return $_ [0]-> {header_from } = lc $_ [1];
6262}
6363
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ sub is_valid_ip {
281281sub is_valid_domain {
282282 my ( $self , $domain ) = @_ ;
283283 return 0 if $domain !~ / ^$RE {net}{domain}{-rfc1101}{-nospace}$ /x ;
284- my $tld = ( split /\./, lc $domain )[-1];
284+ my $tld = ( split /\./, $domain )[-1];
285285 return 1 if $self -> is_public_suffix($tld );
286286 return 0 if $domain eq ' localhost' ;
287287 return 0 if $tld eq ' localdomain' ;
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ sub test_spf {
225225
226226sub test_header_from {
227227
228- my @good_vals = (qw/ spam-example.com bar.com / );
228+ my @good_vals = (qw/ spam-example.com bar.com test.co.UK test.CO.za / );
229229 foreach my $k (@good_vals ) {
230230 ok( $dmarc -> header_from($k ), " header_from, $k " );
231231 }
You can’t perform that action at this time.
0 commit comments