LibreChat/api/server
Danny Avila 9a43362663
🪤 chore: Scope Assistant Tool-Resource Lookups (#15579)
`DELETE /api/files` looked the assistant up by `id`, but the Assistant schema
stores it as `assistant_id`. `api/db/connect.js` sets `strictQuery`, under which
Mongoose drops filter keys absent from the schema — so the lookup degraded to
`findOne({})` and returned whichever assistant happened to be first in the
collection, regardless of owner.

The unlink path then read that stranger's `tool_resources` and intersected it
with the caller's requested files, so a file the caller named could be unlinked
on the strength of another user's assistant record. With an empty collection the
same lookup returned `null` and the unguarded `assistant.tool_resources` threw,
answering 400 instead of completing the request.

Filter on `assistant_id` and guard the dereference. Adds three route tests that
mirror the server's `strictQuery` setting, without which the harness cannot
reproduce either failure.
2026-09-04 00:14:44 -04:00
..
controllers ➕ feat: Add Agent Management Creation Endpoint (#15564) 2026-09-03 23:45:04 -04:00
middleware 🧊 feat: Persist Context Fading Tier Across Agent Runs (#15505) 2026-09-02 20:29:43 -04:00
routes 🪤 chore: Scope Assistant Tool-Resource Lookups (#15579) 2026-09-04 00:14:44 -04:00
services 💓 fix: Detect Silently Dead Redis Sockets With Deadline-Bounded Heartbeats (#15539) 2026-09-03 09:45:16 -04:00
utils 🧊 feat: Persist Context Fading Tier Across Agent Runs (#15505) 2026-09-02 20:29:43 -04:00
cleanup.js
csp.spec.js 🔣 fix: Escape SPA Language Attribute (#15248) 2026-08-26 07:37:36 -04:00
experimental.js 🚰 fix: Record the Provider Drain When Shutdown Cuts a Generation Short (#15532) 2026-09-03 07:11:38 -04:00
experimental.spec.js 🧾 feat: Store Durable Event Actor Receipts (#15265) 2026-08-27 06:00:43 -04:00
index.js 🚰 fix: Record the Provider Drain When Shutdown Cuts a Generation Short (#15532) 2026-09-03 07:11:38 -04:00
index.metrics.spec.js ⏱️ feat: Run Scheduled Chats Through Durable Agent Triggers (#14939) 2026-08-20 11:51:30 -04:00
index.spec.js 🦺 feat: Configurable Baseline HTTP Security Headers (#14445) 2026-08-25 08:21:39 -04:00
socialLogins.js
socialLogins.spec.js
telemetry.js 🪵 feat: Add OpenTelemetry Logs Pipeline via Winston Bridge (#15565) 2026-09-03 21:16:09 -04:00
telemetry.spec.js 🪵 feat: Add OpenTelemetry Logs Pipeline via Winston Bridge (#15565) 2026-09-03 21:16:09 -04:00