filebrowser/auth
Henrique Dias 8ddd3d1db9
fix(auth): isolate auto-provisioned proxy and hook users to their own home
Proxy- and hook-authenticated users were auto-provisioned by applying the
default scope (".") and passing it straight to MakeUserDir, which normalizes
"." to "/". With CreateUserDir enabled, every provisioned user therefore
received the server root as its scope instead of a per-user home directory,
letting one user read, overwrite and delete another user's files.

The signup handler already cleared the scope before deriving the home
directory. Centralize that logic into Settings.CreateUserHome (clear the
scope when CreateUserDir is on and no explicit scope was supplied, derive the
home dir, then reject a scope already owned by another user) and use it from
signup, proxy and hook auth so the three provisioning paths cannot diverge.

Refs GHSA-j7jh-37pf-mf8h, GHSA-j2fc-28fx-hc8q
2026-07-25 08:16:15 +02:00
..
auth.go feat: hook authentication method 2022-07-20 16:40:49 +02:00
hook.go fix(auth): isolate auto-provisioned proxy and hook users to their own home 2026-07-25 08:16:15 +02:00
hook_test.go fix: remove undocumented hook auth with shell replacement 2026-06-03 09:59:36 +02:00
json.go fix: restore symlink behavior as opt-in followExternalSymlinks 2026-06-23 13:19:51 +02:00
none.go fix: restore symlink behavior as opt-in followExternalSymlinks 2026-06-23 13:19:51 +02:00
proxy.go fix(auth): isolate auto-provisioned proxy and hook users to their own home 2026-07-25 08:16:15 +02:00
proxy_test.go fix(auth): reject signup when normalized home dir collides (GHSA-7rc3-g7h6-22m7) 2026-06-27 09:08:56 +02:00
storage.go refactor: add more go linters (#970) 2020-06-01 01:12:36 +02:00