1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
From: Niko Tyni <ntyni@debian.org>
Date: Fri, 6 May 2011 18:03:59 +0300
Subject: [PATCH] Don't pass the full path of the file to parse() in
restricted mode
Bug-Debian: https://bugs.debian.org/613199
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=67996
If the build directory name contains characters like '+', tests 11
and 12 of t/13restricted.t fail because the opensp library considers
the directory unsafe and skips it.
(see PosixStorageManager::isSafe() in lib/PosixStorage.cxx of
opensp-1.5.2)
(adjusted to apply to file with DOS line endings)
--- a/t/13restricted.t 2011-05-06 19:06:03.000000000 +0100
+++ b/t/13restricted.t 2011-05-06 19:19:19.000000000 +0100
@@ -53,7 +53,7 @@
$h8->{ok1} = 0;
$h8->{ok2} = 0;
-my $sd = File::Spec->catfile(File::Spec->rel2abs('.'), 'samples');
+my $sd = 'samples';
$p->search_dirs($sd);
|