LibreChat/api/server
Joseph Licata 5efbcb8b93
🌐 fix: Percent-encode X-File-Metadata header for Unicode filenames (#12983)
* 🌐 fix: Percent-encode X-File-Metadata header for Unicode filenames

After #12977 preserved Unicode in filenames, the download route
crashes with ERR_INVALID_CHAR because JSON.stringify(file) now
contains non-ASCII characters that Node.js rejects in HTTP headers
per RFC 7230.

Wrap the header value in encodeURIComponent on the server and
decodeURIComponent on the client before JSON.parse.

* fix: Update file route tests after dev merge

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2026-05-06 21:01:25 -04:00
..
controllers 🛂 fix: Harden Agent File Preview Access (#12981) 2026-05-06 19:56:04 -04:00
middleware 🛂 fix: Harden Agent File Preview Access (#12981) 2026-05-06 19:56:04 -04:00
routes 🌐 fix: Percent-encode X-File-Metadata header for Unicode filenames (#12983) 2026-05-06 21:01:25 -04:00
services 🛂 fix: Harden Agent File Preview Access (#12981) 2026-05-06 19:56:04 -04:00
utils 🌐 fix: Preserve Unicode Filenames (#12977) 2026-05-06 14:57:38 -04:00
cleanup.js 🧹 refactor: Tighten Config Schema Typing and Remove Deprecated Fields (#12452) 2026-03-29 01:10:57 -04:00
experimental.js 🚀 feat: Decouple File Attachment Persistence from Preview Rendering (#12957) 2026-05-06 03:04:19 -04:00
index.js 🚀 feat: Decouple File Attachment Persistence from Preview Rendering (#12957) 2026-05-06 03:04:19 -04:00
index.spec.js 🚦 fix: 404 JSON Responses for Unmatched API Routes (#11976) 2026-02-27 22:49:54 -05:00
socialLogins.js 🔐 feat: Admin Auth Support for SAML and Social OAuth Providers (#12472) 2026-03-30 22:49:44 -04:00