fix(file-manager): keep exclusive shares in /mnt/user space#2679
fix(file-manager): keep exclusive shares in /mnt/user space#2679elibosley wants to merge 5 commits into
Conversation
|
Warning Review limit reached
More reviews will be available in 6 minutes and 23 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔧 PR Test Plugin AvailableA test plugin has been generated for this PR that includes the modified files. Version: 📥 Installation Instructions:Install via Unraid Web UI:
Alternative: Direct Download
|
Opening an exclusive share in the File Manager silently switched the whole view - and every folder/row link - from /mnt/user/<share> to the raw /mnt/<disk>/<share> path. Cause: validdir() ran the requested dir through realpath(), which follows the symlink that backs an exclusive share (/mnt/user/<share> -> /mnt/<pool|disk>/<share>). validdir() now still validates with realpath() (the resolved path must live under /mnt or /boot, so traversal is still blocked), but re-anchors to a lexically-canonicalized /mnt/(user0?|rootshare) path when that is what was requested. FUSE is bypassed for exclusive shares, so this is the same data at native speed - just shown under the path the user clicked. Applied to both Browse.page and include/Browse.php. Also swap the open-in-File-Manager launcher icon from icon-u-tab (a square-with-arrow / open-in-tab glyph that doesn't say what it does) to fa fa-folder-open across DiskList, ShareList and device_list, matching the folder-open icon already used elsewhere. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
09b0b6f to
f86397e
Compare
…e link The folder-open browse icon sits immediately left of the device/share name link and inherited the same link blue, so the two read as a single element - you couldn't tell the icon was a separate clickable action. Mute the browse icon to --alt-text-color (brightening to the link color on hover to keep the clickable affordance) and add a right-margin gap before the name. Applied once on the shared a.view rule, so DiskList, ShareList and the device list all get it; the empty .view placeholders take the same slot, so column alignment is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Use a closed folder (fa-folder-o) at rest for the browse links and swap to the open variant on hover, so the icon visibly previews the "open this location" action. Done via a single a.view:hover content override in CSS; the icon class changes to fa-folder-o in DiskList, ShareList and the device list. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The ZFS/btrfs pool health text linked to the pool's details section but looked like a stray blue label - same color as the device-name link next to it - so it wasn't clear it was clickable or what it did. Give it a dedicated .pool-status style (muted text, brightens + underlines on hover) and a trailing chevron to mark it navigable, keeping the existing "View pool details" tooltip. Applies to the healthy and problem states. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address the affordance gaps with comprehension cues, not just styling:
- Browse folder links now carry Unraid's standard a.info tooltip ("Open
in File Manager") instead of the slow native title=, so hovering says
what the icon does. Combined with the closed->open swap and hover
color, the action is now self-explanatory. Applied on DiskList,
ShareList and the device list.
- Pool health (ONLINE) is no longer a hyperlink - a clickable status word
is an odd pattern. It's now plain status text, with a small info-circle
beside it as the only clickable element (a.info tooltip "View pool
details") linking to the pool summary. The existing warning icon for
DEGRADED/ERRORS states gets the same styled tooltip.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Summary
Opening an exclusive share in the File Manager silently switched the whole view — and every folder/row link — from
/mnt/user/<share>to the raw/mnt/<disk>/<share>path.Root cause:
validdir()runs the requested dir throughrealpath(), which follows the symlink that backs an exclusive share (/mnt/user/<share>→/mnt/<pool|disk>/<share>). The "Browse" link on the Shares page correctly sends/mnt/user/<share>, butvaliddir()then rewrote it.What changed
validdir()(inBrowse.pageandinclude/Browse.php) still validates withrealpath()— the resolved path must live under/mntor/boot, so path traversal is still blocked — but now re-anchors to a lexically-canonicalized/mnt/(user0?|rootshare)path when that's what was requested. FUSE is bypassed for exclusive shares, so this is the same data at native speed, just shown under the path the user clicked.icon-u-tab(a square-with-arrow / open-in-tab glyph that doesn't communicate its action) tofa fa-folder-openacrossDiskList,ShareList, andnchan/device_list— matching the folder-open icon already used by the flash-backup links.Notes
emhttp/webGuiis a symlink toplugins/dynamix, so the singleinclude/Browse.phpchange covers both paths.realpath()doesn't change the path and the re-anchor is a no-op)./mnt/userpaths, not only exclusive ones —/mnt/useris the correct display path for the File Manager regardless, and it matches the link the user clicked.Testing
php -lclean on all five changed files.validdir()against a simulated exclusive-share symlink:/mnt/user/media✅/mnt/user/docs✅/mnt/disk1/...disk browsing → unchanged ✅/mnt/userroot → unchanged ✅/mnt/user/../../etctraversal → still rejected ✅🤖 Generated with Claude Code