LibreChat/api/server/controllers
Marco Beretta 4c6ea7e981
🔐 fix: Hash Passwords on a Worker Pool and Surface API Key Lookup Failures (#17261)
* fix: Hash Off the Event Loop and Surface API Key Lookup Failures

Registration, email verification, password reset and verification resends
hashed and compared with bcryptjs's synchronous calls. bcryptjs is pure
JavaScript, so each call blocked the event loop for every request in the
process. They now use the promise APIs, and the password reset
dependencies are async.

validateAgentApiKey caught its own query failures and returned null, so a
database outage answered remote callers with 401 Invalid API key. It now
lets the failure reach requireApiKeyAuth, which answers with a 500.

* fix: Run bcrypt on a Worker Pool in packages/api

bcryptjs's promise API still computes on the main thread, only in chunks
of up to 100 ms, so concurrent registrations and resets kept stalling
unrelated requests (four cost-10 hashes delayed a 5 ms timer by about
190 ms). hashSecret and compareSecret now run bcryptjs on a small
worker_threads pool in packages/api, and AuthService.js calls them.

* feat: Configure the Password Hashing Worker Count

* fix: Verify Login and Step-Up Passwords on the Hash Pool
2026-10-19 22:13:31 +02:00
..
__tests__ 🛂 feat: Audit Resource Sharing Changes and Fail Closed on Reversible Audit Writes (#17053) 2026-10-15 00:30:16 +02:00
agents 🗂️ perf: Index Hot Lookups and Project the Remote Models List (#17259) 2026-10-19 21:39:10 +02:00
assistants 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
auth 🔐 fix: Hash Passwords on a Worker Pool and Surface API Key Lookup Failures (#17261) 2026-10-19 22:13:31 +02:00
AuthController.js 🔓 fix: Prevent 30-Second OpenID Refresh Stalls After a Discarded Prerender (#17174) 2026-10-15 16:02:28 -07:00
AuthController.spec.js 🙊 fix: Keep API Keys and Internal Errors Out of Logs and Responses (#17258) 2026-10-19 21:36:46 +02:00
avatar.contentFilter.spec.js 🛍️ fix: Discover Managed Agents in Marketplace Search (#16324) 2026-09-24 22:48:56 -04:00
Balance.js
Balance.spec.js
EndpointController.js
FavoritesController.js
FavoritesController.spec.js
mcp.js 🗂️ feat: Audit MCP, Code Worker, Langfuse, Skill Credential, Passkey and Audit Log Access (#17054) 2026-10-15 00:30:26 +02:00
mcpApps.js 🐛 fix: Restore MCP App Rendering and Actions (#16382) 2026-10-16 13:27:29 -07:00
mcpApps.test.js 🐛 fix: Restore MCP App Rendering and Actions (#16382) 2026-10-16 13:27:29 -07:00
ModelController.js ⚡ perf: Reduce Agent Chat Startup Latency (#14423) 2026-07-25 07:58:20 -04:00
ModelController.spec.js ⚡ perf: Reduce Agent Chat Startup Latency (#14423) 2026-07-25 07:58:20 -04:00
PermissionsController.js 🛂 feat: Audit Resource Sharing Changes and Fail Closed on Reversible Audit Writes (#17053) 2026-10-15 00:30:16 +02:00
PluginController.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
PluginController.spec.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
ReasoningCapabilitiesController.js 🎚️ feat: Filter OpenRouter Reasoning Efforts by the Selected Model (#16808) 2026-10-08 18:04:13 +02:00
SkillStatesController.js 🔌 feat: Integrate Durable Skill Lifecycle Across Writers and Routes (#17043) 2026-10-16 09:05:05 -07:00
TokenConfigController.js 🗂️ fix: Scope Token Config Cache (#13770) 2026-06-15 15:25:19 -04:00
tools.js 🪦 chore: Retire the DALL-E 3 Tool (#17205) 2026-10-17 18:24:22 +02:00
TwoFactorController.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
UserController.js 🔐 fix: Hash Passwords on a Worker Pool and Surface API Key Lookup Failures (#17261) 2026-10-19 22:13:31 +02:00
UserController.spec.js 🗑️ fix: Route Delete-User CLI Through the Shared Account Erasure Cascade (#17033) 2026-10-14 23:53:16 +02:00