mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-07-21 15:10:30 +00:00
f2ef2851d3
#3964 [security] gate first-password bootstrap (_set_password on POST /api/settings while auth disabled) to local clients — blocks remote unauth first-run ownership. Uses request-start auth snapshot (auth_enabled_before), so no mid-request TOCTOU. Self-rebased onto v0.51.357 (8-behind, 3-dot fidelity verified byte-identical). #3970 (oauth single-flight) DROPPED from this stage: Codex+Opus both caught a check-then-insert race — _pending_oauth_flow_for releases the lock before the device-code request + flow insertion, so concurrent unauth starts still spawn multiple workers (Codex empirically reproduced w/ 2 threads). Returned to author w/ the atomic per-(provider,home) start-lock fix. Re-gating the (N-1) stage. Co-authored-by: Hinotoi-agent <Hinotoi-agent@users.noreply.github.com>