projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f30830
)
Don't resolve links to self forever
author
Jamie Cameron
<jcameron@webmin.com>
Thu, 27 Aug 2009 17:11:14 +0000
(10:11 -0700)
committer
Jamie Cameron
<jcameron@webmin.com>
Thu, 27 Aug 2009 17:11:14 +0000
(10:11 -0700)
web-lib-funcs.pl
patch
|
blob
|
history
diff --git
a/web-lib-funcs.pl
b/web-lib-funcs.pl
index
92dbea7
..
cdadc98
100755
(executable)
--- a/
web-lib-funcs.pl
+++ b/
web-lib-funcs.pl
@@
-6478,7
+6478,11
@@
shift(@p);
for(my $i=0; $i<@p; $i++) {
my $sofar = "/".join("/", @p[0..$i]);
my $lnk = readlink($sofar);
- if ($lnk =~ /^\//) {
+ if ($lnk eq $sofar) {
+ # Link to itself! Cannot do anything more really ..
+ last;
+ }
+ elsif ($lnk =~ /^\//) {
# Link is absolute..
return &resolve_links($lnk."/".join("/", @p[$i+1 .. $#p]));
}