Repository navigation
Conversation
1f57d18 to
00c7c66
Compare
|
Rebased this onto current Local verification on Go 1.26.3:
GitHub has only run the title check on the new head so far; the main CI workflow has not been scheduled yet. |
|
Merged current Local verification on the new head
|
6df2c90 to
1089a60
Compare
|
Rebased onto current Local verification after the rebase:
The branch is mergeable again on GitHub. As before, GitHub has only scheduled the title check on the new head so far; the main CI workflow has not appeared yet. |
…128) * chore: update translations Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> * chore(deps): update all non-major dependencies (#5926) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: Fix conflict modal and add a resume transfert option (#5884) Co-authored-by: Henrique Dias <[email protected]> * chore(release): 2.63.3 * chore(deps): update all non-major dependencies (#5929) * chore: sync translations * chore: fix typo * fix: show item shares from all users to admins (#5941) * chore: sync translations (#5945) * chore: revert node dependencies updates * chore(release): 2.63.4 * fix(router): handle undefined catchAll param on root redirect (#5955) * chore(release): 2.63.5 * chore: disable automatic major updates * fix: remove undocumented hook auth with shell replacement * docs: clarify hide dotfiles * fix: incorrect access control in public directory shares via rule path rebasing * fix: cross-user unauthorized share-link deletion * fix: address three security disclosures (archive traversal, login DoS, symlink escape) - http/raw.go: strip Windows backslash separators from archive entry names on any host. filepath.ToSlash is a no-op for "\" on Linux, so a stored backslash filename was emitted verbatim and could escape the extraction directory on Windows extractors (zip-slip). (GHSA-gxjx-7m74-hcq8) - http/auth.go: cap the login and signup request bodies with http.MaxBytesReader (1 MiB). The JSON decoder previously read an arbitrarily large password into memory before bcrypt truncated it, enabling unauthenticated memory-exhaustion DoS. (GHSA-w5fm-68j4-fpc4) - files/file.go, http/resource.go: add files.WithinScope and refuse to follow a symlink whose on-disk target escapes the user's scoped root, on both the read path (stat) and the write path (writeFile). Prevents a scoped user from reading/overwriting/sharing files outside their scope via a pre-existing escaping symlink. (GHSA-239w-m3h6-ch8v) Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix: parse csv files with uneven columns in their rows (#5965) * chore: Updates for project File Browser (#5947) * chore(docs): update CLI documentation * chore(release): 2.63.6 * fix: disallow shares for non-existent paths * chore(release): 2.63.7 * fix: check if share is within scope when creating * chore(release): 2.63.8 * fix: force octet-stream for attachment downloads (#5942) * fix: prevent symlink scope escape in copy/move/rename Check WithinScope for src and dst in resourcePatchHandler before fileutils.Copy/MoveFile, which follow symlinks and bypassed the stat()/writeFile() guards (GHSA-239w-m3h6-ch8v). * fix: use constant-time comparison for share access token Compare the share token with subtle.ConstantTimeCompare instead of ==. * fix: set X-Content-Type-Options: nosniff on raw file responses Prevents browsers from MIME-sniffing uploaded files into a renderable type. * chore(release): 2.63.9 * fix: allow writes when user scope resolves to filesystem root WithinScope compared targets against root+separator, which produced "//" when the scope resolved to "/". No path matched, so every write was rejected with os.ErrPermission (HTTP 403), breaking saves and uploads for root-scoped installs. Skip the appended separator when root already ends in one. * chore(release): 2.63.10 * fix: incomplete fix for symlinked directories let scopes users and public-share recipients read and write files outside of scope * chore(release): 2.63.11 * fix: skip inaccessible children when listing directories (#5958) * fix: keep mobile file sort controls visible (#5977) * fix: await copy move conflict detection (#5978) * chore(release): 2.63.12 * refactor: cleanup and simplify upload.ts * fix: copy/move allow overwrite * chore(release): 2.63.13 * fix: recursive check * refactor: ScopedFs to avoid escaping symlinks * chore: add symlink tests * chore(release): 2.63.14 --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Anthony Geourjon <[email protected]> Co-authored-by: Henrique Dias <[email protected]> Co-authored-by: mehmet turac <[email protected]> Co-authored-by: Jose Olcese <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: Ariel Leyva <[email protected]> Co-authored-by: Puneet Dixit <[email protected]> Co-authored-by: Agent Overnight Tests <[email protected]>
Description
Fixes directory listing so one inaccessible child does not make the whole parent directory fail to load.
When
afero.ReadDirfails because a child cannot be statted, the listing now falls back to reading names only, stats each child separately, and skips only entries that still cannot be read. Accessible siblings continue to be returned in the listing.Fixes #5627
Additional Information
This keeps the current fast path unchanged. The fallback is only used after the normal directory read fails.
Testing
GOMODCACHE=/tmp/filebrowser-5627-gomodcache GOCACHE=/tmp/filebrowser-5627-gocache go test ./files -run TestReadListingSkipsInaccessibleChildren -count=1failed withpermission deniedGOMODCACHE=/tmp/filebrowser-5627-gomodcache GOCACHE=/tmp/filebrowser-5627-gocache go test ./files -run TestReadListingSkipsInaccessibleChildren -count=1GOMODCACHE=/tmp/filebrowser-5627-gomodcache GOCACHE=/tmp/filebrowser-5627-gocache go test ./files -count=1test -z "$(gofmt -l files/file.go files/file_test.go)"git diff --cached --checkGOMODCACHE=/tmp/filebrowser-5627-gomodcache GOCACHE=/tmp/filebrowser-5627-gocache go test ./...GOMODCACHE=/tmp/filebrowser-5627-gomodcache GOCACHE=/tmp/filebrowser-5627-gocache go build ./...golangci-lintis not installed in my local environment, so I could not run the repo lint config locally.Checklist
masterbranch.