Skip Menu |

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

Report information
The Basics
Id: 39554
Status: stalled
Priority: 0/
Queue: Archive-Extract

People
Owner: Nobody in particular
Requestors: dagolden [...] cpan.org
Cc:
AdminCc:

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



Subject: Must set $Archive::Tar::CHOWN, not $Archive::Tar::Constant::CHOWN
The wrong constant is set to prevent Archive::Tar from using permissions in the archive. This is a potential security risk if files in the archive have world-writable permissions. -- David
On Tue Sep 23 16:07:51 2008, DAGOLDEN wrote: Show quoted text
> The wrong constant is set to prevent Archive::Tar from using permissions > in the archive. This is a potential security risk if files in the > archive have world-writable permissions.
Good catch. I've made the change. Cheers,
Actually, that is not enough - one should also set $Archive::Tar::CHMOD : {{{{{{{{{ shlomi:~$ cat archive-extract-test.pl #!/usr/bin/perl use strict; use warnings; use Archive::Extract; my $ae = Archive::Extract->new(archive => "world-write.tar.gz"); $ae->extract(to => "$ENV{HOME}/TEMP/unpack/"); shlomi:~$ tar -tvf world-write.tar.gz drwxr-xr-x shlomi/shlomi 0 2008-10-30 18:55 world-write/ -rwxrwxrwx shlomi/shlomi 6 2008-10-30 18:55 world-write/GOOD shlomi:~$ perl -I Archive-Extract-0.28/lib/ archive-extract-test.pl shlomi:~$ ls -lR TEMP/unpack/ TEMP/unpack/: total 0 drwxr-xr-x 2 shlomi shlomi 17 2008-10-30 19:17 world-write TEMP/unpack/world-write: total 4 -rwxrwxrwx 1 shlomi shlomi 6 2008-10-30 18:55 GOOD shlomi:~$ umask 0022 shlomi:~$ }}}}}}}}}
I can replicate on OS X.
On Thu Nov 13 14:15:21 2008, MSCHWERN wrote: Show quoted text
> I can replicate on OS X.
Disabling CHMOD also means that essential file permissions are lost, like +x, as well as read/write access. These things have caused trouble in the past, especially in the CPAN toolchain, so I'm very reluctant to change this. Suggestions are welcome of course.