diff options
author | TechSneeze <dave@techsneeze.com> | 2021-03-08 21:14:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-08 21:14:44 +0300 |
commit | 723467b5e1551fb4c10a6ab79f42c46418b49f04 (patch) | |
tree | 2d8b252c525c71953ee09c6f967c7cd158861867 | |
parent | 01c50cdb07c5c385178474ccd36d360c9a7757e6 (diff) | |
parent | f44c78e413732416ff953f6c332a3770821cc7a6 (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-x | dmarcts-report-parser.pl | 4 |
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'}; |