LibreChat/api/server/middleware
Marco Beretta d0e253043a
🙈 fix: Mask Emails and Drop Personal Identifiers From Logs (#17048)
* fix: Mask Email Addresses and Drop Personal Identifiers from Logs

* fix: Log User IDs in OpenID Admin Role and LDAP Domain Block Messages

* fix: Mask Unicode Email Addresses in Log Redaction

* test: Add Log Email Masking Scenarios

* fix: Bound the Email Redaction Matcher and Handle Quoted Local Parts

* fix: Mask Quoted and Special-Character Email Local Parts

* fix: Redact Whole Email Tokens, Top-Level Log Fields and Metadata Keys

* fix: Redact Top-Level Metadata Keys and Escaped Quotes in Email Local Parts

* fix: Redact Truncated Emails, Address Literals and Request Paths in Logs

* fix: Redact the Full Log String Before Truncating

* fix: Preserve Colliding and Object Keys When Redacting Log Metadata

* fix: Bound Log Redaction to a Window Past the Truncation Limit

* fix: Redact the Truncation Window Without a Whitespace Cut

* fix: Redact Serialized Quoted Addresses and Keep Key Collisions Linear

* fix: Bound Every Log Redaction Path and the URL Credential Pattern

* fix: Keep Long-Scheme Credential Redaction and Serialized Escaped Quotes

* test: Cover Every Secret Shape Across the Log Truncation Cap

* fix: Drop Unfinished Window Tokens, Mask Short TLDs and Redact Direct Error Stacks

* fix: Treat Input End as a Token Boundary and Mask Parenthesized Identifiers

* fix: Remove the Quoted Local Part Length Cap Without Quadratic Scans

* fix: Drop an Unfinished Quoted Address at the Window Edge

* fix: Check Quoted Locals Before Accepting a Window Delimiter

* fix: Count Only Opening Quotes When Trimming the Window

* fix: Track Unmatched Quoted Locals Instead of Counting Closing Quotes

* fix: Lift Residual Email Caps, Keep Punctuated Credential URIs Masked and Move OBO Log Id to the API Package

* fix: Mask Empty Quoted Locals and Tolerate Read-Only Log Fields

* fix: Return a Sanitized Copy When a Log Field Cannot Be Replaced

* fix: Treat a Failed Key Removal as a Failed Replacement and Guard Stack Writes

* fix: Skip Heavy Error Graphs and Accept Escaped Backslashes in Serialized Locals

* fix: Accept Lone Escaped Backslashes in Serialized Locals Without Rescans

* fix: Compact Axios Request Info Before Redaction and Skip Heavy Splat Error Graphs

* fix: Redact Address Keys on Nested Error Objects

* fix: Materialize and Redact Enumerable Getters on Nested Errors

* fix: Guard Throwing Top-Level Getters and Skip Heavy Fields Only on Error Records

* fix: Skip Serialized Quotes When Trimming an Unfinished Address

* fix: Bound Redaction With a Per-Record Node Budget and Accept JSON Control Escapes

* fix: Match Credential URIs From the Separator So Scheme Length Is Unbounded

* fix: Count Strings Against the Redaction Budget and Guard Nested Getters

* fix: Rebuild the Log Record When a Top-Level Accessor Ignores Writes

* fix: Rebuild the Log Record When a Stack Accessor Ignores Writes

* fix: Guard the Initial Stack Read on Direct Error Logs

* fix: Accept Escaped Solidus and Preserve the Outer Budget on Reentrant Logging

* fix: Guard the Axios Marker and Error-Like Probes Against Throwing Getters

* fix: Guard the Axios Marker on Nested Errors

* fix: Replace Skipped Heavy Fields Up Front, Budget Top-Level Fields and Mask Encoded Emails

* fix: Mask Encoded Address Keys and Guard Nested Axios Config Compaction

* fix: Redact URL Objects in Compact Request Info

* fix: Remove Encoded Email Caps and Strip Serializer Hooks From Clones

* fix: Strip Serializer Hooks From Error Clones and Top-Level Records

* fix: Neutralize Inherited Serializer Hooks on Log Records

* fix: Guard the Serializer Hook Probe

* fix: Replace Function Values in Log Records

* fix: Mask Percent-Encoded Domain Separators in Logged URLs

* fix: Bound the Encoded Email Domain at URL Delimiters

* fix: Shadow Throwing Serializer Getters on Nested Errors

* fix: Rebuild Accessor Messages and Mask Doubly Encoded Addresses

* fix: Redact Multiply Encoded Address Keys

* feat: Make the Log Redaction Node Budget Configurable

* fix: Guard Message and Serializer Property Reads

* fix: Contain Proxy Failures and Redact the Compact Request Method
2026-10-15 15:54:27 +02:00
..
__tests__ 📃 fix: Enforce Terms Acceptance on the Server and Mark Backfilled Consent (#17063) 2026-10-14 17:45:28 +02:00
accessResources ♻️ refactor: Native Prompts Behind a Shared Service and Adapter (#16506) 2026-10-02 08:40:39 -04:00
assistants 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
config 💓 feat: Keep Quiet Chat Streams Alive Behind Idle-Timeout Proxies (#16904) 2026-10-09 10:29:45 +02:00
limiters 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
roles 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
spec 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
validate ⏳ fix: Separate Temporary and General Chat Retention (#15734) 2026-09-08 11:22:54 -04:00
abortMiddleware.js 🙈 fix: Mask Emails and Drop Personal Identifiers From Logs (#17048) 2026-10-15 15:54:27 +02:00
abortMiddleware.spec.js 🔔 feat: Unseen Reply Indicators, Reply Notifications, and Mark as Unread (#15025) 2026-10-01 03:46:16 +00:00
abortRun.js 🧾 fix: Honor Disabled Transactions on the Assistants Usage Path (#15100) 2026-08-25 08:30:12 -04:00
blockRetiredSetupToken.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
buildEndpointOption.js 🎚️ feat: Filter OpenRouter Reasoning Efforts by the Selected Model (#16808) 2026-10-08 18:04:13 +02:00
buildEndpointOption.spec.js 💬 refactor: ChatForm UI redesign with unified palette (#14473) 2026-10-01 03:46:18 +00:00
canAccessSharedLink.js
canDeleteAccount.js
canDeleteAccount.spec.js
checkBan.js 🛶 fix: Keep Trigger Bans Off Shared Loopback IPs (#16535) 2026-09-29 20:50:23 -04:00
checkBan.spec.js 🛶 fix: Keep Trigger Bans Off Shared Loopback IPs (#16535) 2026-09-29 20:50:23 -04:00
checkDomainAllowed.js
checkInviteUser.js 📮 fix: Consume an Invite Only Once the Account Exists (#15611) 2026-09-04 15:38:32 -04:00
checkInviteUser.spec.js 📮 fix: Consume an Invite Only Once the Account Exists (#15611) 2026-09-04 15:38:32 -04:00
checkPeoplePickerAccess.js 🫂 fix: Scope People Picker Searches to Permitted Types (#15878) 2026-09-13 02:48:27 -04:00
checkSharePublicAccess.js
checkSharePublicAccess.spec.js
denyRequest.js 📔 feat: Preserve Owner Text During PII Redaction (#16311) 2026-10-02 11:43:10 -04:00
denyRequest.privateText.spec.js 📔 feat: Preserve Owner Text During PII Redaction (#16311) 2026-10-02 11:43:10 -04:00
error.js 🔔 feat: Unseen Reply Indicators, Reply Notifications, and Mark as Unread (#15025) 2026-10-01 03:46:16 +00:00
error.spec.js 🔔 feat: Unseen Reply Indicators, Reply Notifications, and Mark as Unread (#15025) 2026-10-01 03:46:16 +00:00
index.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
logHeaders.js 🙈 fix: Mask Emails and Drop Personal Identifiers From Logs (#17048) 2026-10-15 15:54:27 +02:00
messageValidation.js
moderateText.js 🧢 fix: Cap Batched HITL Answers Before PII and Moderation (#15257) 2026-08-26 10:10:19 -04:00
moderateText.spec.js 🧢 fix: Cap Batched HITL Answers Before PII and Moderation (#15257) 2026-08-26 10:10:19 -04:00
noIndex.js
oauthNavigation.js 🔐 fix: Redirect OAuth Browser Navigations Instead of Rendering JSON (#15440) 2026-08-31 21:13:47 -04:00
optionalJwtAuth.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
optionalJwtAuth.spec.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
optionalShareFileAuth.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
optionalShareFileAuth.spec.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
requireJwtAuth.js 📃 fix: Enforce Terms Acceptance on the Server and Mark Backfilled Consent (#17063) 2026-10-14 17:45:28 +02:00
requireLdapAuth.js
requireLocalAuth.js
requireSameOrigin.js 🧿 fix: Bind Login Flows to the Browser That Started Them (#15880) 2026-09-13 11:47:29 -04:00
setHeaders.js
setTwoFactorTempUser.js 🔐 feat: Enforce Required Two-Factor Authentication (#14731) 2026-10-01 23:39:51 +02:00
uaParser.js
validateEmailLogin.js
validateImageRequest.js 🪦 refactor: Remove Dead Legacy API Modules and Root Tooling (#17114) 2026-10-15 12:25:24 +02:00
validateMessageReq.js
validateModel.js 🌐 fix: Expose Gemini Models to Vertex AI Agents (#15234) 2026-08-27 06:50:23 -04:00
validatePasswordReset.js
validateRegistration.js