21349 Commits
Author SHA1 Message Date
Kamil Myśliwiec c666d7f722 v11.2.7 v11.2.7 2026-09-30 11:10:04 +02:00
Kamil Myśliwiec 8bd644e91c fix(websockets): keep the message stream alive when a handler throws
A handler that throws synchronously escaped the mergeMap in the
socket.io adapter's bindMessageHandlers and errored the stream, and a
handler whose error filter rethrows rejects the same way in both
adapters: the stream dies, that event goes silent for the client and
RxJS reports an unhandled error.

Both adapters now defer the handler call and catchError the stream, so
a sync throw or a rejected handler only drops that one message. A
filter that rethrows is an app bug, so the failure gets logged through
the adapter logger instead of being swallowed silently.

Backport of 4247f6e5d0 (#17666) to v11.
2026-09-30 09:58:35 +02:00
Kamil Myśliwiec 2618406e76 fix(websockets): stop unserializable replies from crashing the process
WsAdapter serialized handler responses with a bare JSON.stringify inside
the subscriber callback, and IoAdapter called socket.emit/ack there too.
JSON.parse accepts arbitrarily deep input while JSON.stringify and
socket.io's recursive encoder overflow the stack on it, so a handler
echoing client data let a single message throw from the subscriber,
which RxJS rethrows asynchronously and which terminates the process.
Circular references and BigInts crashed the same way.

Catch and log serialization failures so the offending reply is dropped
and the connection and process keep running.

Backport of 7e961f8b52 to v11.
2026-09-30 09:52:47 +02:00
Kamil Myśliwiec c07cfb0be5 v11.2.6 v11.2.6 2026-09-23 11:03:41 +02:00
Kamil Myśliwiec fb8ecdbef1 fix(deps): update dependency multer to v2.4.0 [security]
Fixes CVE-2026-88932 (GHSA-3pph-fpjx-jg34).

Closes #17847
2026-09-23 10:49:39 +02:00
Kamil Myśliwiec 58c3634b25 fix(express): map multer errors by code instead of message
Backport of #17769. multer 2.4.0 changed the LIMIT_UNEXPECTED_FILE
message, so matching on error.message turned a file sent under an
unexpected field name into a 500 instead of a 400.
2026-09-23 10:49:39 +02:00
Kamil Myśliwiec e91618ceec chore(release): publish v11.2.5 release v11.2.5 2026-09-15 09:09:43 +02:00
Kamil MyśliwiecandClaude Opus 5 dee4ed4dbc fix(microservices): harden the tcp transport against a hostile peer
Backport of the shutdown and memory-bound fixes from 12.x.

"ServerTCP#close" only called "net.Server#close", which stops the server
from accepting new connections but leaves established ones untouched. A
connection opened before the shutdown therefore survived it: the process
was kept alive by the dangling socket long after "app.close()" resolved,
and messages arriving on that connection were still dispatched to message
handlers. Accepted sockets are now tracked and destroyed when the server
closes.

Two further paths let a single peer grow the process heap without limit.
A peer could declare a packet length, send part of the payload and then
go silent, and nothing ever reaped the connection. On the sending side
the return value of "socket.write" was discarded, so a peer that issued
requests without reading the responses made the process queue every
response in memory.

An idle timer now drops a peer that stops sending mid-packet. It is
refreshed on every read, so a slow but progressing transfer is never
interrupted and a peer sitting idle between packets is left alone.
Reading is suspended while a peer's outgoing buffer is backed up, and
responses queued for a peer that reads nothing are capped. Both limits
are configurable on the server and the client through the new
"incompleteMessageTimeout" and "maxSendBufferSize" options, and either
can be turned off by setting it to 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 21:30:14 +02:00
Kamil Myśliwiec d5046225d8 chore(release): publish v11.2.4 release v11.2.4 2026-09-14 20:13:13 +02:00
Kamil MyśliwiecandClaude Fable 5.1 e9dcd4c7ac fix(microservices): handle unserializable patterns without crashing
"JSON.stringify" throws a RangeError for deeply nested message patterns.
The TCP and RMQ servers stringified client-controlled patterns without
guarding against it, and the resulting unhandled promise rejection
terminated the process.

Patterns are now stringified safely (falling back to a sentinel that
matches no handler) and rejected message handling is routed to
"handleError" instead of being left unhandled.

Backport of aa97b5144d (master).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 16:06:12 +02:00
Kamil MyśliwiecandClaude Fable 5.1 5226fe084c fix(platform-fastify): absolute-form request target middleware bypass
Requests using an absolute-form request target ("GET http://host/path")
were routed to the handler by Fastify while path-scoped middleware, which
matched against the raw request target, never ran.

- replace the inlined @fastify/middie fork with the upstream package
  (9.3.4), which resolves absolute-form targets before matching and
  already contains the decoded-path fix the fork was carrying
- resolve absolute-form targets in the adapter's own route check
- fold the deprecated top-level Fastify router options into
  "routerOptions" so that @fastify/middie normalizes request paths the
  same way the router does

Backport of dda252090e (master).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 16:06:11 +02:00
Kamil Myśliwiec 2b36ee5fea chore(release): publish v11.2.3 release v11.2.3 2026-08-25 12:58:35 +02:00
Kamil Myśliwiec e12b47b90b fix(core): circular durable providers issue #17562 2026-08-25 12:57:16 +02:00
Kamil Myśliwiec 7e65752ba4 chore(release): publish v11.2.2 release v11.2.2 2026-08-25 09:56:52 +02:00
Kamil Myśliwiec 7ebaa889dc chore: drop skip instrumentation - duplicated api 2026-08-25 09:48:26 +02:00
Kamil Myśliwiec 4593b0ad33 fix(core): preserve middleware arity #17554 2026-08-25 09:12:20 +02:00
Kamil Myśliwiec 35a29ccfe1 fix(core): instrument middleware fallback issue 2026-08-25 08:53:37 +02:00
Kamil Myśliwiec 4535f43b48 chore(release): publish v11.2.1 release v11.2.1 2026-08-14 19:51:41 +02:00
Kamil Myśliwiec a326599e8c fix(core): fix sse early-return 2026-08-14 19:50:03 +02:00
Kamil Mysliwiec a112f3fbd4 Merge pull request #17472 from nestjs/renovate/graphql-tools-monorepo
fix(deps): update dependency graphql-tools to v9.0.34
2026-08-14 14:21:11 +02:00
Kamil Myśliwiec f2a7e4b1f5 chore(release): publish v11.2.0 release v11.2.0 2026-08-14 14:10:35 +02:00
Kamil Mysliwiec 56333a42d9 Merge pull request #17473 from nestjs/renovate/fastify-5.x-lockfile
chore(deps): update dependency fastify to v5.12.0
2026-08-14 14:04:30 +02:00
renovate[bot] 7bb9c7d296 chore(deps): update dependency fastify to v5.12.0 2026-08-14 12:03:24 +00:00
renovate[bot] 250d1f57c4 fix(deps): update dependency graphql-tools to v9.0.34 2026-08-14 12:03:07 +00:00
Kamil Mysliwiec b2e7fb5e76 Merge pull request #17469 from nestjs/feat/sse-signal
feat(core): sse signal
2026-08-14 14:02:55 +02:00
Kamil Mysliwiec 42f0cfdef7 Merge pull request #17471 from nestjs/renovate/github-codeql-action-4.x
chore(deps): update github/codeql-action action to v4.37.7
2026-08-14 13:59:14 +02:00
Kamil Myśliwiec 6498f11a98 feat: signal should finalize in every case 2026-08-14 13:55:33 +02:00
Kamil Mysliwiec 25b1a2f76a Merge pull request #17388 from nestjs/renovate/node-26.x
chore(deps): update dependency @types/node to v26.2.0
2026-08-14 13:32:20 +02:00
renovate[bot] 3d1c186636 chore(deps): update github/codeql-action action to v4.37.7 2026-08-14 11:32:19 +00:00
Kamil Mysliwiec eb85032ed6 Merge pull request #17468 from nestjs/renovate/conventional-changelog-8.x
chore(deps): update dependency conventional-changelog to v8.1.3
2026-08-14 13:29:09 +02:00
Kamil Mysliwiec 11ecc44158 Merge pull request #17467 from nestjs/renovate/commitlint-monorepo
chore(deps): update commitlint monorepo to v21.2.2
2026-08-14 13:29:00 +02:00
Kamil Mysliwiec 67ce40ecf1 Merge pull request #17461 from nestjs/renovate/redis-6.x
chore(deps): update dependency redis to v6.2.1
2026-08-14 13:28:52 +02:00
Kamil Myśliwiec 7627546075 feat(core): sse signal 2026-08-14 12:51:35 +02:00
renovate[bot] bd0f7f7224 chore(deps): update dependency redis to v6.2.1 2026-08-14 10:38:03 +00:00
renovate[bot] 139375fa14 chore(deps): update dependency @types/node to v26.2.0 2026-08-14 10:37:38 +00:00
renovate[bot] e63193dbd3 chore(deps): update dependency conventional-changelog to v8.1.3 2026-08-14 10:37:11 +00:00
renovate[bot] fea1082ef5 chore(deps): update commitlint monorepo to v21.2.2 2026-08-14 10:37:00 +00:00
Kamil Mysliwiec 96e1f1a67a Merge pull request #17310 from brayanjeshua/feat/query-method-e2e
test(testing): Add e2e integration tests for HTTP QUERY method (RFC 10008)
2026-08-14 12:31:24 +02:00
Kamil Mysliwiec 5d93228db2 Merge pull request #17086 from LeSingh1/fix/parse-enum-numeric-reverse-mapping
fix(common): exclude reverse-mapped keys from numeric enum validation in ParseEnumPipe
2026-08-14 12:30:37 +02:00
Braies Agent 4edffd3345 test(testing): Add e2e tests for HTTP QUERY method (RFC 10008) 2026-08-14 12:16:49 +02:00
Kamil MysliwiecandCopilot Autofix powered by AI 4fbd6e6206 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-08-14 12:09:39 +02:00
Kamil Mysliwiec eac10cd2d7 Merge pull request #17162 from gacardinal/feat/query-http-method
feat(core,common,platform-fastify): add query http method support
2026-08-14 12:08:33 +02:00
Kamil Mysliwiec deec03c6d8 Merge pull request #17445 from nestjs/renovate/fastify-static-10.x
fix(deps): update dependency @fastify/static to v10.1.3
2026-08-14 11:59:38 +02:00
Kamil Mysliwiec 0f30dcc478 Merge pull request #17464 from johnnyhuirilef/fix/lazy-dynamic-module-pre-registered-imports
fix(core): scan pre-registered dynamic imports of lazy modules
2026-08-14 11:59:06 +02:00
renovate[bot] 093419f1f0 fix(deps): update dependency @fastify/static to v10.1.3 2026-08-14 06:45:10 +00:00
Kamil Mysliwiec 451ca37837 Merge pull request #17466 from nestjs/dependabot/npm_and_yarn/fastify/static-10.1.3
chore(deps-dev): bump @fastify/static from 10.1.2 to 10.1.3
2026-08-14 08:40:15 +02:00
dependabot[bot] 4e74c782ab chore(deps-dev): bump @fastify/static from 10.1.2 to 10.1.3
Bumps [@fastify/static](https://github.com/fastify/fastify-static) from 10.1.2 to 10.1.3.
- [Release notes](https://github.com/fastify/fastify-static/releases)
- [Commits](https://github.com/fastify/fastify-static/commits)

---
updated-dependencies:
- dependency-name: "@fastify/static"
  dependency-version: 10.1.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-14 00:53:18 +00:00
Johnny J. Huirilef Millán 73f28b2300 fix(core): scan pre-registered dynamic imports of lazy modules
A lazily loaded `DynamicModule` whose dynamic metadata carries `imports`
never had those imports scanned, so their providers could not resolve.

`NestContainer#setModule` pre-registers a dynamic module's `imports` via
`addDynamicMetadata` -> `addDynamicModules` -> `addModule` before the
scanner recurses into them. Those modules therefore report
`inserted: false`, and the lazy skip condition treated them as already
loaded, leaving them registered but never scanned or instantiated.

Skip only modules that were actually instantiated, and bind global
providers on every lazy pass: a rescanned module reports
`inserted: false`, so `lazy && moduleInserted` skipped binding `@Global`
providers into it.

Closes #17462
2026-08-13 09:53:27 -04:00
Kamil Mysliwiec 674ac31d4f Merge pull request #17455 from nestjs/renovate/fastify-5.x
fix(deps): update dependency fastify to v5.11.3
2026-08-11 10:27:01 +02:00
Kamil Mysliwiec d5e06caa8b Merge pull request #17457 from nestjs/renovate/nest-graphql-monorepo
fix(deps): update nest-graphql monorepo to v13.4.4
2026-08-11 10:26:52 +02:00