You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being a line-oriented file format, literal newlines in paths cause generated packlists to be wrong.
use strict;
use warnings;
use Test::More;
use ExtUtils::Packlist;
use File::Temp qw( tempfile );
my$packlist = ExtUtils::Packlist->new();
my$evil_path = "/some/evil\npath";
my$packfile = tempfile;
$packlist->{$evil_path} = { type=>'file' };
$packlist->write($packfile);
my$new_packlist = ExtUtils::Packlist->new($packfile);
ok( exists$packlist->{$evil_path},
"Original path found in packlist before writing" )
or diag explain $packlist;
ok( exists$new_packlist->{$evil_path},
"Original path found in packlist after reading" )
or diag explain $new_packlist;
done_testing;
ok 1 - Original path found in packlist before writing
not ok 2 - Original path found in packlist after reading
# Failed test 'Original path found in packlist after reading'
# at /tmp/eup.pl line 22.
# bless( {
# '/some/evil' => undef,
# 'path' => {
# 'type' => 'file'
# }
# }, 'ExtUtils::Packlist' )
1..2
# Looks like you failed 1 test of 2
The text was updated successfully, but these errors were encountered:
Currently the packfile format simply does not allow for the data
it stores to contain a newline. Instead of allowing us to write
a broken packfile and then find out later it is unreadable we throw
an exception when we try to write.
This is part of a response to Issue #8.
Being a line-oriented file format, literal newlines in paths cause generated packlists to be wrong.
The text was updated successfully, but these errors were encountered: