[lintian] 01/04: L::Path: Use symbolic resolution instead of is_ancestor_of
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 8a92df272dd86321834b0796228313d29f0a0b44
Author: Niels Thykier <niels@thykier.net>
Date: Mon Sep 29 20:16:12 2014 +0200
L::Path: Use symbolic resolution instead of is_ancestor_of
Signed-off-by: Niels Thykier <niels@thykier.net>
---
lib/Lintian/Path.pm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/Lintian/Path.pm b/lib/Lintian/Path.pm
index 919fb7b..97629ac 100644
--- a/lib/Lintian/Path.pm
+++ b/lib/Lintian/Path.pm
@@ -430,10 +430,8 @@ sub _check_access {
if (exists($self->{'_valid_path'})) {
$safe = $self->{'_valid_path'};
} else {
- my $root_path = $self->_collect_path;
- if (!-e $path || !is_ancestor_of($root_path, $path)) {
- $safe = 0;
- }
+ my $resolvable = $self->resolve_path;
+ $safe = 0 if not $resolvable;
}
if (not $safe) {
$self->{'_valid_path'} = $self->{'_is_open_ok'} = 0;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: