Skip Menu |
 

This queue is for tickets about the Archive-Zip CPAN distribution.

Report information
The Basics
Id: 11801
Status: resolved
Priority: 0/
Queue: Archive-Zip

People
Owner: Nobody in particular
Requestors: lupe [...] lupe-christoph.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.14
Fixed in: 1.14



Subject: Fails to unpack Sober.l ZIP file. WARNING!!! ATTACHMENT CONTAINS A VIRUS!!!
Download (untitled) / with headers
text/plain 337b
The Sober.l ZIP file can be unpacked with unzip and presumably with Windows ZIP utilities. Archive::Zip fails to unpack it, thereby denying AMaViS the chance to detect the worm. See http://groups.google.com/groups?q=%22do_executable%2Fdo_unzip%20failed%2C%20ignoring%3A%20format%20error%3A%20bad%20signature%3A%22&hl=de&lr=&sa=N&tab=wg
Download MailTexte.zip
application/x-zip-compressed 44.3k

Message body not shown because it is not plain text.

RT-Send-CC: steve.peters [...] gmail.com,lhecking [...] users.sourceforge.net
Download (untitled) / with headers
text/plain 463b
I have tested the sample zip file with all the examples that are shipped with Archive::Zip, and they all handle the file properly. That is, I have run all of these examples on the file at a command line: zipinfo.pl extract.pl unzipAll.pl zipcheck.pl ziplist.pl ziptest.pl I suspect that this is a problem in Amavis. I have copied Steve Peters, the new co-maintainer of A::Z; he has generously offered to help. Please direct follow-ups to both of us. Thanks!
Download (untitled) / with headers
text/plain 108b
I'll get Amavis set up and try to narrow down where the problem might be. I'll let you know what I find.
I played around with Amavis and dupilicated most of its do_unzip() method in the test program below. I was able to extract the file. Compaing the `od` output of the member extracted with unzip(1) and test program below showed no differences. It looks like the problem is in a section of Amavis unrelated to the Archive::Zip code. #!/usr/bin/perl -w use strict; use Archive::Zip qw ( :CONSTANTS :ERROR_CODES ); my $zip = new Archive::Zip; Archive::Zip::setErrorHandler(sub{return 5}); my $ziperr = $zip->read("MailTexte.zip"); Archive::Zip::setErrorHandler(sub{die @_}); print "read() failed\n" if ($ziperr != AZ_OK); my $compmeth = ''; foreach ($zip->members()) { $compmeth = $_->compressionMethod; if ($compmeth == COMPRESSION_DEFLATED || $compmeth == COMPRESSION_STORED) { my $newpart = $_->fileName(); $zip->extractMember($_,$newpart) unless ($_->isDirectory); } else { # FIXME note: per member print $_->fileName(), ": unsupported compression method: $compmeth\n"; } }


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.