mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
fix xvol false-positive;
given the following config: * volume /a mapped to /srv/nas/ * volume /b mapped to /srv/nas/foo/ * anyone can read volume /a but not /b accessing /a/foo/ would incorrectly fail because the xvol-check would select /b based on its abspath being physically closer, not considering that the same abspath is reachable from /a
This commit is contained in:
parent
dcc6b1b4ef
commit
d9046f7e01
|
@ -881,6 +881,15 @@ class VFS(object):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if "xvol" in self.flags:
|
if "xvol" in self.flags:
|
||||||
|
self_ap = self.realpath + os.sep
|
||||||
|
if aps.startswith(self_ap):
|
||||||
|
vp = aps[len(self_ap) :]
|
||||||
|
if ANYWIN:
|
||||||
|
vp = vp.replace(os.sep, "/")
|
||||||
|
vn2, _ = self._find(vp)
|
||||||
|
if self == vn2:
|
||||||
|
return self
|
||||||
|
|
||||||
all_aps = self.shr_all_aps or self.root.all_aps
|
all_aps = self.shr_all_aps or self.root.all_aps
|
||||||
|
|
||||||
for vap, vns in all_aps:
|
for vap, vns in all_aps:
|
||||||
|
|
Loading…
Reference in a new issue