filebrowser/auth
Henrique Dias fb6aeba9ea
fix(users): make the provisioned scope check atomic with the save
The check that stops two usernames normalizing to the same home directory
ran as a storage operation separate from the save, so two first-time users
provisioned concurrently could both observe a free scope and both be saved
into it, ending up sharing one home directory.

Move the check into users.Storage.SaveProvisioned, which holds a single
lock across the lookup and the save, and reduce CreateUserHome to deriving
and creating the directory. This covers all three provisioning paths:
signup, proxy auth and hook auth.

Refs GHSA-j7jh-37pf-mf8h
2026-07-25 22:15:27 +02:00
..
auth.go feat: hook authentication method 2022-07-20 16:40:49 +02:00
hook.go fix(users): make the provisioned scope check atomic with the save 2026-07-25 22:15:27 +02:00
hook_test.go test(auth): cover per-user scope isolation for proxy and hook provisioning 2026-07-25 08:16:18 +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(users): make the provisioned scope check atomic with the save 2026-07-25 22:15:27 +02:00
proxy_test.go fix(users): make the provisioned scope check atomic with the save 2026-07-25 22:15:27 +02:00
storage.go refactor: add more go linters (#970) 2020-06-01 01:12:36 +02:00