Skip to content

Commit

Permalink
remove empty record structure in order to stringify it correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
bigio committed Aug 27, 2024
1 parent 8cd8323 commit e194e7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Mail/SPF/Server.pm
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ sub process {
}
catch Mail::SPF::ENoAcceptableRecord with {
if((not defined $request->{record}->{terms}[0]->{domain_spec}->{text}) or ($request->{record}->{terms}[0]->{domain_spec}->{text} !~ /\.\./)) {
# remove empty record structure in order to stringify it correctly
undef $request->{record};
$result = $self->result_class('none' )->new($self, $request, shift->text);
} else {
$result = $self->result_class('permerror')->new($self, $request, shift->text);
Expand Down

0 comments on commit e194e7f

Please sign in to comment.