[medium] Deactivated users keep access #10

Closed
opened 2026-10-18 15:51:55 +00:00 by jfro · 0 comments
Owner

Severity: medium
Affects: main

Files: oidc_controller.ex:163-170 (no Accounts.active? check before log_in_user, unlike user_session_controller.ex:25/51); lib/fuzzy_catalog_web/user_auth.ex:67-76 (fetch_current_scope_for_user doesn't check status, so existing sessions/remember-me cookies survive deactivation).
Fix: check active? in the OIDC path and in fetch_current_scope_for_user; delete the user's tokens when an admin deactivates them.


Found by Nye's audit, 2026-10-18 (static review of main @1d89af4 and jtk/ebook-management @43a849e).

**Severity:** medium **Affects:** main Files: oidc_controller.ex:163-170 (no Accounts.active? check before log_in_user, unlike user_session_controller.ex:25/51); lib/fuzzy_catalog_web/user_auth.ex:67-76 (fetch_current_scope_for_user doesn't check status, so existing sessions/remember-me cookies survive deactivation). Fix: check active? in the OIDC path and in fetch_current_scope_for_user; delete the user's tokens when an admin deactivates them. --- _Found by Nye's audit, 2026-10-18 (static review of main @1d89af4 and jtk/ebook-management @43a849e)._
jfro closed this issue 2026-10-18 17:19:03 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfro/fuzzy_catalog#10
No description provided.