LibreChat/packages/api/src/middleware
Danny Avila 01413eea3d
🛡️ feat: Add Middleware for JSON Parsing and Prompt Group Updates (#10757)
* 🗨️ fix: Safe Validation for Prompt Updates

- Added `safeValidatePromptGroupUpdate` function to validate and sanitize prompt group update requests, ensuring only allowed fields are processed and sensitive fields are stripped.
- Updated the `patchPromptGroup` route to utilize the new validation function, returning appropriate error messages for invalid requests.
- Introduced comprehensive tests for the validation logic, covering various scenarios including allowed and disallowed fields, enhancing overall request integrity and security.
- Created a new schema file for prompt group updates, defining validation rules and types for better maintainability.

* 🔒 feat: Add JSON parse error handling middleware
2025-12-02 00:10:30 -05:00
..
access.spec.ts 🔧 refactor: Change Permissions Check from some to every for Stricter Access Validation (#8270) 2025-07-05 15:53:08 -04:00
access.ts 🏪 feat: Agent Marketplace 2025-08-13 16:24:18 -04:00
balance.spec.ts 🛜 refactor: Streamline App Config Usage (#9234) 2025-08-26 12:10:18 -04:00
balance.ts 🔃 refactor: Decouple Effects from AppService, move to data-schemas (#9974) 2025-10-05 06:37:57 -04:00
error.spec.ts 🔎 feat: Add Prompt and Agent Permissions Migration Checks (#9063) 2025-08-14 17:20:00 -04:00
error.ts 🔒 fix: Provider Validation for Social, OpenID, SAML, and LDAP Logins (#8999) 2025-08-11 18:51:46 -04:00
index.ts 🛡️ feat: Add Middleware for JSON Parsing and Prompt Group Updates (#10757) 2025-12-02 00:10:30 -05:00
json.spec.ts 🛡️ feat: Add Middleware for JSON Parsing and Prompt Group Updates (#10757) 2025-12-02 00:10:30 -05:00
json.ts 🛡️ feat: Add Middleware for JSON Parsing and Prompt Group Updates (#10757) 2025-12-02 00:10:30 -05:00