Skip to content

Commit

Permalink
Merge pull request #6 from bigio/empty_labels
Browse files Browse the repository at this point in the history
correctly handle empty labels
  • Loading branch information
marcbradshaw authored Jun 11, 2024
2 parents 58f723f + 50a9c0e commit 9508bd7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Mail/SPF/Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,11 @@ sub process {
$result = $self->result_class('temperror')->new($self, $request, shift->text);
}
catch Mail::SPF::ENoAcceptableRecord with {
$result = $self->result_class('none' )->new($self, $request, shift->text);
if((not defined $request->{record}->{terms}[0]->{domain_spec}->{text}) or ($request->{record}->{terms}[0]->{domain_spec}->{text} !~ /\.\./)) {
$result = $self->result_class('none' )->new($self, $request, shift->text);
} else {
$result = $self->result_class('permerror')->new($self, $request, shift->text);
}
}
catch Mail::SPF::ERedundantAcceptableRecords with {
$result = $self->result_class('permerror')->new($self, $request, shift->text);
Expand Down

0 comments on commit 9508bd7

Please sign in to comment.