LibreChat/api
Hao bd08a363c4
🔣 fix: Encode Images From Storage Keys (#15851)
* fix: Prefer storage keys for image encoding

* fix: Sanitize assistant image errors

* fix: Sanitize agent image storage errors

* fix: Move blob image encoding into API package

* fix: Complete image encoder TypeScript migration

* fix: Keep request-boundary error logs diagnosable

getSafeErrorMetadata reduces an error to { type: 'Error' } and an optional
status. That is the right bound where an error may echo submitted content, and
it stays in place at getS3FileStream, getAzureFileStream and
getFirebaseFileStream, where a signed URL reaches the log.

Applied at ResumableAgentController's initialization catch and the chatV1
generic branch it blinded the whole route: a missing key, an agent that fails to
load and a database error all logged as { type: 'Error' }, with no message,
name, code or stack.

getSafeErrorText keeps the error's own description and stack, reduces every URL
to its origin so an object path and signature cannot ride along, and strips
bearer credentials. It returns text so the two handlers log it inside the
message and pass no winston metadata, which is what stops an SDK error's own
enumerable properties (request.url, config, response.headers) from being
promoted onto the record.

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2026-09-12 12:39:26 -04:00
..
app 📿 fix: Inspect Stored File Locators Per Message (#15841) 2026-09-11 16:47:48 -04:00
cache 🚰 fix: Throttle Shared Link Reads and Aggregate Audit Findings (#15605) 2026-09-04 12:38:34 -04:00
config 🫧 fix: Retire Cancelled MCP OAuth State (#15702) 2026-09-07 15:43:02 -04:00
db 🈳 fix: Treat Blank Mongo Index Settings as Unset (#15809) 2026-09-09 23:24:18 -04:00
models 🧩 fix: Preserve Deployment Skill IDs on Agents (#14368) 2026-07-21 19:44:27 -04:00
server 🔣 fix: Encode Images From Storage Keys (#15851) 2026-09-12 12:39:26 -04:00
strategies 🪪 fix: Guard Null Avatar URLs in Social Login (#15747) 2026-09-08 13:39:01 -04:00
test 🔢 fix: Normalize PDF Citation Page Numbers (#15731) 2026-09-09 00:45:38 -04:00
utils ⚡ feat: Add Gemini 3.8 Flash Support (#15519) 2026-09-02 15:06:40 -04:00
jest.config.js 🪬 fix: Fence Agent Checkpoint Ownership and Cleanup Recovery (#15680) 2026-09-07 22:04:59 -04:00
jsconfig.json
package.json 📦 chore: bump npm audit packages and @librechat/agents to v3.8.5 (#15770) 2026-09-09 01:33:24 -04:00
typedefs.js 🛂 test: Cover Tool Approval Workflows End to End (#14427) 2026-07-26 21:58:25 -04:00