Sitelet https://github.com/filebrowser/filebrowser/pull/5891
Skip to content
This repository was archived by the owner on Aug 31, 2026. It is now read-only.

fix: check download permission in resource handler - #5891

Merged
hacdias merged 1 commit into
filebrowser:masterfrom
kodareef5:fix/resource-download-permission-check
Apr 4, 2026
Merged

hacdias merged 1 commit into
filebrowser:masterfrom
kodareef5:fix/resource-download-permission-check

Conversation

@kodareef5

Copy link
Copy Markdown
Contributor

Summary

  • resourceGetHandler served text file content and raw bytes via X-Encoding without checking Perm.Download
  • The three other content-serving endpoints (/api/raw, /api/preview, /api/subtitle) all enforce this check
  • Set Content: d.user.Perm.Download and add a download guard before the X-Encoding raw byte path

Ref: GHSA-67cg-cpj7-qgc9

The resourceGetHandler served text file content and raw bytes via the
X-Encoding header without checking Perm.Download. The three other
content-serving endpoints (raw, preview, subtitle) all enforce this
check. Align the resource handler with the same pattern.

Ref: GHSA-67cg-cpj7-qgc9
@kodareef5
kodareef5 requested a review from a team as a code owner April 4, 2026 15:11
@hacdias
hacdias merged commit 1e03fea into filebrowser:master Apr 4, 2026
7 checks passed
kumaraguru1735 pushed a commit to kumaraguru1735/filebrowser-laravel that referenced this pull request Apr 8, 2026
- filebrowser#5891: Check download perm for binary files in resourceGet
- filebrowser#5889: Reject .. paths before realpath (defense in depth)
- filebrowser#5888: Verify share owner download perm on public access
- filebrowser#5848: Normalize double slashes in TUS upload paths
- Add X-Content-Type-Options for epub/svg/html inline previews

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants