LibreChat/api/server/middleware
Marco Beretta 379a6ff247
🔒 fix: Restrict Stop to the Generation's Owner and Contain S3 Ingest Stream Errors (#17256)
* fix: Restrict Stop to the Generation's Owner and Contain S3 Ingest Stream Errors

The legacy abort route passed any caller-supplied conversation id straight to
GenerationJobManager.abortJob, so a signed-in user who knew another user's
conversation id could stop that generation and receive its partial output.
abortOwnedGeneration now reads the job first and stops it only for its owner
and tenant, fenced to the epoch it read; anything else reads as not found.

saveURLToS3 piped Readable.fromWeb into the byte-limit transform with .pipe,
which does not forward source errors. A body that failed mid-download emitted
an unhandled error and left the upload awaiting forever. Use stream.pipeline,
as the CloudFront strategy already does.

* test: Cover Stop Ownership on the Legacy Abort Route

* test: Scope the Parts Attachment Check to the Composer Tray

The file name also labels a hidden recent-file row once earlier tests in the
shard have left one mounted, so the unscoped locator resolved to two buttons.
2026-10-19 15:56:03 +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: Restrict Stop to the Generation's Owner and Contain S3 Ingest Stream Errors (#17256) 2026-10-19 15:56:03 +02:00
abortMiddleware.spec.js 🔒 fix: Restrict Stop to the Generation's Owner and Contain S3 Ingest Stream Errors (#17256) 2026-10-19 15:56:03 +02: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 ⚡ perf: Optimize First Load of Large Conversations (#14901) 2026-08-16 19:45:21 -04:00
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