Skip to content

Commit 2e03ac8

Browse files
authored
Merge pull request #1002 from ikedas/issue-988
ARC::Signer died because of a malformed "Authentication-Results:" header field (#988)
2 parents 6db8e94 + fef332b commit 2e03ac8

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/lib/Sympa/Message.pm

+5-6
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,8 @@ sub arc_seal {
610610
my $msg_as_string = $self->as_string;
611611
$msg_as_string =~ s/\r?\n/\r\n/g;
612612
$msg_as_string =~ s/\r?\z/\r\n/ unless $msg_as_string =~ /\n\z/;
613-
$arc->PRINT($msg_as_string);
614-
unless ($arc->CLOSE) {
615-
$log->syslog('err', 'Cannot ARC seal message');
613+
unless (eval { $arc->PRINT($msg_as_string) and $arc->CLOSE }) {
614+
$log->syslog('err', 'Cannot ARC seal message: %s', $EVAL_ERROR);
616615
return undef;
617616
}
618617
$log->syslog('debug2', 'ARC %s: %s', $arc->{result},
@@ -730,9 +729,9 @@ sub check_arc_chain {
730729
my $msg_as_string = $self->as_string;
731730
$msg_as_string =~ s/\r?\n/\r\n/g;
732731
$msg_as_string =~ s/\r?\z/\r\n/ unless $msg_as_string =~ /\n\z/;
733-
$arc->PRINT($msg_as_string);
734-
unless ($arc->CLOSE) {
735-
$log->syslog('err', 'Cannot verify chain of (ARC) message');
732+
unless (eval { $arc->PRINT($msg_as_string) and $arc->CLOSE }) {
733+
$log->syslog('err', 'Cannot verify chain of (ARC) message: %s',
734+
$EVAL_ERROR);
736735
return;
737736
}
738737

0 commit comments

Comments
 (0)