Subject: | Error in global destruction when run with taint checks |
I'm running Mail::Audit 2.1 with perl 5.6.1. It was installed by my web hosting company. I'm also using Mail::SpamAssassin 2.43, but I think the bug doesn't lie there.
When I send mail to my test script, it does what I want, but I also get a bounce from the mailer-daemon due to this error message the script produces:
(in cleanup) Insecure dependency in unlink while running setuid at /usr/lib/perl5/5.6.1/File/Path.pm line 233 during global destruction.
That line is in rmtree(), which is presumably called from Mail::Audit::MimeEntity's sub DESTROY, which calls "rmtree(\@to_rmdir, 0, 1)". I'm not sure what's in @to_rmdir (it's populated with $parser->filer->output_dir, apparently) but it's presumably based on non-untainted user input or something. Could this be turned off by untainting whatever it is that fills @to_rmdir? (Oh, and the directory is apparently not deleted.)
I'm running setuid (so I can write log info to my private directory even though the script is called as user 'mail') and have the script running with -T, and I don't want filtered mail to produce such an error message output (even though it'll get correctly delivered, hopefully) to people who send me mail.