LibreChat/packages
Danny Avila 5e789f589f
🔏 fix: Strip Unnecessary Fields Across Write Paths in Conversation & Message Methods (#12498)
* fix: Exclude field from conversation and message updates

* fix: Remove tenantId from conversation and message update objects to prevent unintended data exposure.
* refactor: Adjust update logic in createConversationMethods and createMessageMethods to ensure tenantId is not included in the updates, maintaining data integrity.

* fix: Strip tenantId from all write paths in conversation and message methods

Extends the existing tenantId stripping to bulkSaveConvos, bulkSaveMessages,
recordMessage, and updateMessage — all of which previously passed caller-supplied
tenantId straight through to the update document. Renames discard alias from _t
to _tenantId for clarity. Adds regression tests for all six write paths.

* fix: Eliminate double-copy overhead and strengthen test assertions

Replace destructure-then-spread with spread-once-then-delete for saveConvo,
saveMessage, and recordMessage — removes one O(n) copy per call on hot paths.
Add missing not-null and positive data assertions to tenantId stripping tests.

* test: Add positive data assertions to bulkSaveMessages and recordMessage tests
2026-04-01 11:16:39 -04:00
..
api 🗂️ fix: Allow Empty-Overrides Scope Creation in Admin Config (#12492) 2026-03-31 21:46:48 -04:00
client 📦 chore: bump dependabot packages (#12487) 2026-03-31 13:36:20 -04:00
data-provider 📦 chore: bump axios to exact v1.13.6, @librechat/agents to v3.1.63, @aws-sdk/client-bedrock-runtime to v3.1013.0 (#12488) 2026-03-31 14:49:31 -04:00
data-schemas 🔏 fix: Strip Unnecessary Fields Across Write Paths in Conversation & Message Methods (#12498) 2026-04-01 11:16:39 -04:00