From 85b6827c56aefc72bce46ae883e01ab28b235536 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 1 Jun 2026 10:32:50 +0200 Subject: [PATCH] Handle missing percent values .. by setting them to the default value of 100% Resolves: https://github.com/userjack6880/Open-DMARC-Analyzer/issues/112 --- report-parser.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/report-parser.pl b/report-parser.pl index a6049a3..1e438c0 100755 --- a/report-parser.pl +++ b/report-parser.pl @@ -1002,7 +1002,7 @@ sub storeXMLInDatabase { $policy_aspf = $xml->{'policy_published'}->{'aspf'}; $policy_p = $xml->{'policy_published'}->{'p'}; $policy_sp = $xml->{'policy_published'}->{'sp'}; - $policy_pct = $xml->{'policy_published'}->{'pct'}; + $policy_pct = $xml->{'policy_published'}->{'pct'} // 100; } else { $domain = $xml->{'policy_published'}[0]->{'domain'}; @@ -1010,7 +1010,7 @@ sub storeXMLInDatabase { $policy_aspf = $xml->{'policy_published'}[0]->{'aspf'}; $policy_p = $xml->{'policy_published'}[0]->{'p'}; $policy_sp = $xml->{'policy_published'}[0]->{'sp'}; - $policy_pct = $xml->{'policy_published'}[0]->{'pct'}; + $policy_pct = $xml->{'policy_published'}[0]->{'pct'} // 100; } my $record = $xml->{'record'};