LibreChat/packages/api/src/memory
Mihidum 54511b2b8c
🧠 fix: Return 400 for Invalid Memory Keys (#14618)
* fix: return 400 for invalid memory key format instead of 500

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: trim PATCH rename key to match POST normalization

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: return 400 when PATCH rename key is not a string

A non-string `key` in the PATCH body (e.g. {"key": 123}) previously fell
back to the URL key and updated the memory with a 200, hiding the invalid
field. Reject any defined non-string key with 400 before normalization.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: share memory key validation between schema and routes

* fix: reject blank memory rename keys

* test: use real data-provider exports in memory route suite

* fix: share memory key validation with ID updates

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
2026-09-06 04:34:06 +02:00
..
authorization.spec.ts 🧲 fix: Anchor Memory Partitions to Accessible Agents (#15475) 2026-09-01 18:37:52 -04:00
authorization.ts 🧲 fix: Anchor Memory Partitions to Accessible Agents (#15475) 2026-09-01 18:37:52 -04:00
config.spec.ts
config.ts
handlers.spec.ts
handlers.ts 🧠 fix: Return 400 for Invalid Memory Keys (#14618) 2026-09-06 04:34:06 +02:00
index.ts 🧲 fix: Anchor Memory Partitions to Accessible Agents (#15475) 2026-09-01 18:37:52 -04:00
protection.spec.ts
protection.ts