fix: recursive check

This commit is contained in:
Henrique Dias committed 2026-06-07 17:12:31 +02:00
1 parent 67ed670d92
commit 3406d3d7f9
6 files changed
+94 -13

No files matched your search

-4
View File
@@ -475,10 +475,6 @@ func (i *FileInfo) readListing(checker rules.Checker, readHeader bool, calcImgRe
isSymlink, isInvalidLink := false, false
if IsSymlink(f.Mode()) {
isSymlink = true
// A symlink whose on-disk target escapes the scoped root must not be
// followed, otherwise the listing would leak the target's metadata
// (and downstream access) for files outside the user's scope or the
// shared subtree.
if ok, scopeErr := WithinScope(i.Fs, fPath); scopeErr != nil || !ok {
continue
}