open-webui/backend/open_webui
Classic298 96a0b3239b
fix: prevent first-user admin race in LDAP and OAuth registration (#23626)
Both LDAP and OAuth registration checked user count before insert to determine whether to assign admin role.  With multiple workers, concurrent first-user registrations could each see zero users and both create admin accounts.

Applies the insert-first-check-after pattern already used by signup_handler: insert with DEFAULT_USER_ROLE, then atomically check get_num_users()==1 and promote only the sole user to admin.
2026-04-12 11:28:41 -05:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal refac 2026-03-17 17:58:01 -05:00
migrations refac 2026-04-01 18:26:46 -05:00
models fix: filter on is_active in channel membership checks (#23623) 2026-04-12 11:13:51 -05:00
retrieval refac 2026-03-26 19:01:33 -05:00
routers fix: prevent first-user admin race in LDAP and OAuth registration (#23626) 2026-04-12 11:28:41 -05:00
socket refac 2026-04-01 07:42:11 -05:00
static refac 2026-03-23 23:39:52 -05:00
storage refac 2026-03-17 17:58:01 -05:00
test refac 2026-03-17 17:58:01 -05:00
tools refac 2026-04-11 16:44:12 -06:00
utils fix: prevent first-user admin race in LDAP and OAuth registration (#23626) 2026-04-12 11:28:41 -05:00
__init__.py refac (#22987) 2026-03-24 15:41:26 -05:00
alembic.ini fix: Alembic CLI commands from failing 2025-08-15 04:17:47 -04:00
config.py enh: automation 2026-04-11 17:06:58 -06:00
constants.py refac 2026-03-25 17:29:57 -05:00
env.py fix(redis): add opt-in health_check_interval for stale pooled connections (#23573) 2026-04-11 16:17:19 -06:00
functions.py refac 2026-04-08 13:34:23 -07:00
main.py enh: automation 2026-04-11 17:06:58 -06:00
tasks.py refac 2026-03-17 17:58:01 -05:00