fix: recursive check

This commit is contained in:
Henrique Dias 2026-06-07 17:12:31 +02:00
parent 67ed670d92
commit 3406d3d7f9
No known key found for this signature in database
6 changed files with 94 additions and 13 deletions

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
}