msimerson / mail-dmarc

Mail::DMARC, a complete DMARC implementation in Perl
Other
33 stars 23 forks source link

"Use of uninitialized value" messages #241

Open richlv opened 1 month ago

richlv commented 1 month ago

Describe the bug Running dmarc_receive against a file prints a bunch "Use of uninitialized value" messages. Unfortunately, the input file cannot be shared - but perhaps the messages allow to identify where validation might be useful.

Use of uninitialized value in lc at /usr/lib/perl5/site_perl/5.40.0/Mail/DMARC/Report/Receive.pm line 227.

Use of uninitialized value $c_type in string eq at /usr/lib/perl5/site_perl/5.40.0/Mail/DMARC/Report/Receive.pm line 142.
Use of uninitialized value $c_type in string eq at /usr/lib/perl5/site_perl/5.40.0/Mail/DMARC/Report/Receive.pm line 143.
Use of uninitialized value $c_type in string eq at /usr/lib/perl5/site_perl/5.40.0/Mail/DMARC/Report/Receive.pm line 148.
Use of uninitialized value $c_type in string eq at /usr/lib/perl5/site_perl/5.40.0/Mail/DMARC/Report/Receive.pm line 156.
Use of uninitialized value $c_type in string eq at /usr/lib/perl5/site_perl/5.40.0/Mail/DMARC/Report/Receive.pm line 156.
Use of uninitialized value $c_type in string eq at /usr/lib/perl5/site_perl/5.40.0/Mail/DMARC/Report/Receive.pm line 163.
Use of uninitialized value $c_type in concatenation (.) or string at /usr/lib/perl5/site_perl/5.40.0/Mail/DMARC/Report/Receive.pm line 181.
Unknown message part

Server (please complete the following information):

Perl (please complete the following information):

richlv commented 1 month ago

This seems to happen with all XML report files, thus it is a bit of a user error - checking the docs, it expects whole message, not the attachment directly. Perhaps this can be validated a bit?