You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix subfolder sharing with directory scope enforcement
Fixes issue #1068 — subfolders inaccessible when browsing a shared folder link.
Root causes fixed:
- SearchManager: recursiveDir flag adds path LIKE clause so subdirectory
media and directory listings are visible under a share root
- SessionManager: passes recursiveDir=true to both projection query builders
- GalleryRouter + AuthenticationMWs: LimitedGuest role now reaches the
directory listing route; authoriseSharingDirectory enforces that the
requested path is the share root or a descendant — unrelated paths get 401
- SharingMWs + SharingDTO: /share/<key>/key endpoint returns passwordProtected
flag so the frontend can decide whether to show a password prompt
- navigation.service / error.interceptor / authentication.service: fixed
blank-screen deadlock and 401 redirect loop on password-protected shares
- gallery.component: directory shares navigate to gallery/<dir> view so
subfolder cards are clickable, not to the flat search results view
- navigator: breadcrumb links enabled for paths at or below the share root;
routes observable now uses combineLatest so breadcrumbs recompute when
share metadata arrives (fixes stale-null race on cached content loads)
- share.service: removed debug console.log
Security:
- authoriseSharingDirectory fails closed — unrecognised AND query shapes
return 401 rather than silently granting access
- normalizeDirPath canonicalises '.' (Utils.concatUrls root form), '/' and ''
to the same empty string so root-directory shares are not falsely rejected
- Non-directory shares (date/person) permitted at the route level; content
scope is enforced by the DB-layer projectionQuery
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments