[PATCH] Don't pass the full path of the file to parse() in restricted mode

Niko Tyni ntyni at debian.org
Fri May 6 15:03:59 UTC 2011


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)
---
 t/13restricted.t |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/t/13restricted.t b/t/13restricted.t
index ea91f25..2bb095d 100755
--- a/t/13restricted.t
+++ b/t/13restricted.t
@@ -53,7 +53,7 @@ isnt($h8->{ok2}, 0, 'must not read paths with ./');
 $h8->{ok1} = 0;
 $h8->{ok2} = 0;
 
-my $sd = File::Spec->catfile(File::Spec->rel2abs('.'), 'samples');
+my $sd = 'samples';
 
 $p->search_dirs($sd);
 
-- 
1.7.4.4


--oyUTqETQ0mS9luUI--





More information about the pkg-perl-maintainers mailing list