Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/techsneeze/dmarcts-report-parser.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTechSneeze <dave@techsneeze.com>2021-03-08 21:14:44 +0300
committerGitHub <noreply@github.com>2021-03-08 21:14:44 +0300
commit723467b5e1551fb4c10a6ab79f42c46418b49f04 (patch)
tree2d8b252c525c71953ee09c6f967c7cd158861867
parent01c50cdb07c5c385178474ccd36d360c9a7757e6 (diff)
parentf44c78e413732416ff953f6c332a3770821cc7a6 (diff)
Merge pull request #89 from wolfgangkarall/bugfix_no_auth_results
Avoid fatal error when there's no 'auth_results' in the XML
-rwxr-xr-xdmarcts-report-parser.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/dmarcts-report-parser.pl b/dmarcts-report-parser.pl
index 0f90ace..90447e8 100755
--- a/dmarcts-report-parser.pl
+++ b/dmarcts-report-parser.pl
@@ -828,6 +828,10 @@ sub storeXMLInDatabase {
my $identifier_hfrom = $r{'identifiers'}->{'header_from'};
my ($dkim, $dkimresult, $spf, $spfresult, $reason);
+ if(ref $r{'auth_results'} ne "HASH"){
+ print "Report has no auth_results data. Skipped.\n";
+ return 0;
+ }
my $rp = $r{'auth_results'}->{'dkim'};
if(ref $rp eq "HASH") {
$dkim = $rp->{'domain'};