Matteo Collina
d7a5c587c0
src: rethrow stack overflow exceptions in async_hooks
...
When a stack overflow exception occurs during async_hooks callbacks
(which use TryCatchScope::kFatal), detect the specific "Maximum call
stack size exceeded" RangeError and re-throw it instead of immediately
calling FatalException. This allows user code to catch the exception
with try-catch blocks instead of requiring uncaughtException handlers.
The implementation adds IsStackOverflowError() helper to detect stack
overflow RangeErrors and re-throws them in TryCatchScope destructor
instead of calling FatalException.
This fixes the issue where async_hooks would cause stack overflow
exceptions to exit with code 7 (kExceptionInFatalExceptionHandler)
instead of being catchable.
Fixes: https://github.com/nodejs/node/issues/37989
Ref: https://hackerone.com/reports/3456295
PR-URL: https://github.com/nodejs-private/node-private/pull/773
Refs: https://hackerone.com/reports/3456295
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
CVE-ID: CVE-2025-59466
2026-01-08 12:15:36 -03:00
RafaelGSS
494f62dc23
lib,permission: require full read and write to symlink APIs
...
Refs: https://hackerone.com/reports/3417819
PR-URL: https://github.com/nodejs-private/node-private/pull/760
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
CVE-ID: CVE-2025-55130
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
2026-01-08 12:15:36 -03:00
RafaelGSS
14fbbb510c
lib: disable futimes when permission model is enabled
...
Refs: https://hackerone.com/reports/3390084
PR-URL: https://github.com/nodejs-private/node-private/pull/748
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
CVE-ID: CVE-2025-55132
PR-URL: https://github.com/nodejs-private/node-private/pull/802
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
CVE-ID: CVE-2025-55132
2026-01-08 12:15:35 -03:00
Matteo Collina
85f73e7057
tls: route callback exceptions through error handlers
...
Wrap pskCallback and ALPNCallback invocations in try-catch blocks
to route exceptions through owner.destroy() instead of letting them
become uncaught exceptions. This prevents remote attackers from
crashing TLS servers or causing resource exhaustion.
Fixes: https://hackerone.com/reports/3473882
PR-URL: https://github.com/nodejs-private/node-private/pull/782
PR-URL: https://github.com/nodejs-private/node-private/pull/796
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
CVE-ID: CVE-2026-21637
2026-01-07 16:59:55 -03:00
Shima Ryuhei
144233b71a
process: fix wrong asyncContext under unhandled-rejections=strict
...
Fixes: https://github.com/nodejs/node/issues/60034
PR-URL: https://github.com/nodejs/node/pull/60103
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2025-11-19 18:31:39 +01:00
Deokjin Kim
b1da374503
test: fix typo of test-benchmark-readline.js
...
"bechmark" -> "benchmark" in test-benchmark-readline.js.
And fix test name in test-benchmark-validators.js.
PR-URL: https://github.com/nodejs/node/pull/59993
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2025-11-19 18:31:39 +01:00
Richard Lau
4b4e38f497
test: mark sea tests flaky on macOS x64
...
PR-URL: https://github.com/nodejs/node/pull/60068
Refs: https://github.com/nodejs/node/issues/59553
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-11-19 18:17:49 +01:00
Ruben Bridgewater
409cb773a4
repl: fix cpu overhead pasting big strings to the REPL
...
Pasting input should not trigger any completions and other
calculations. This is now handled by just writing the string to the
terminal in case the user is pasting. As soon as pasting is done,
the completions will be re-enabled.
Fixes: https://github.com/nodejs/node/issues/40626
Fixes: https://github.com/nodejs/node/issues/43343
PR-URL: https://github.com/nodejs/node/pull/59857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-11-19 18:17:46 +01:00
Xuguang Mei
d1c9d80cac
repl: add isValidParentheses check before wrap input
...
PR-URL: https://github.com/nodejs/node/pull/59607
Backport-PR-URL: https://github.com/nodejs/node/pull/60066
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-11-19 18:17:46 +01:00
sangwook
393ff7226e
util: fix numericSeparator with negative fractional numbers
...
Fix util.inspect() formatting bug where negative fractional numbers
between -1 and 0 lost their minus sign when numericSeparator was true.
Fixed formatNumber function to preserve sign by using original string
representation. Also corrected test expectations for scientific notation
to not apply numeric separators.
Fixes: https://github.com/nodejs/node/issues/59376
PR-URL: https://github.com/nodejs/node/pull/59379
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-11-19 18:17:45 +01:00
Richard Lau
cbf4fc34c3
test: skip more sea tests on Linux ppc64le
...
Theses tests are failing when compiled with clang. Skip for now to
avoid breaking the CI when we switch over to building with clang.
PR-URL: https://github.com/nodejs/node/pull/59755
Refs: https://github.com/nodejs/node/issues/59561
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-11-19 18:17:44 +01:00
Joyee Cheung
9543facad7
test: mark test-inspector-network-fetch as flaky again
...
https://redirect.github.com/nodejs/node/pull/59104 did not fix it
and it's still flaky in the CI.
Refs: https://github.com/nodejs/reliability/blob/main/reports/2025-08-26.md
Refs: https://github.com/nodejs/node/issues/59090
PR-URL: https://github.com/nodejs/node/pull/59640
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-11-19 18:17:43 +01:00
Joyee Cheung
4f858d22ac
test: skip test-fs-cp* tests that are constantly failing on Windows
...
These tests are likely actual regressions introduced when the
monolithic test-fs-cp.mjs was marked as flaky and got ignored due
to the flaky status. They are now constantly failing the Windows
CI and require the CI to always be re-run on Windows when the job
is resumed. Simply skip them until someone fixes them, as there's
no point keep running these known regressions on Windows anymore.
PR-URL: https://github.com/nodejs/node/pull/59637
Refs: https://github.com/nodejs/node/issues/59636
Refs: https://github.com/nodejs/node/pull/59408
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com >
2025-11-19 18:17:42 +01:00
Richard Lau
3ec534dbe8
test: skip sea tests on Linux ppc64le
...
Theses tests are failing when compiled with clang. Skip for now to
avoid breaking the CI when we switch over to building with clang.
PR-URL: https://github.com/nodejs/node/pull/59563
Refs: https://github.com/nodejs/node/issues/59561
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-11-19 18:17:41 +01:00
Ruben Bridgewater
9e8beff0f4
util: fix error's namespaced node_modules highlighting using inspect
...
When inspecting errors, node_modules are highlighted with an
underscore. So far namespaced modules only highlighted the namespace
but not the rest of the module name. This is fixed by matching the
full name.
As drive-by it improves the performance slightly by removing the
regular expression in favor of indexOf to identify the right spot.
PR-URL: https://github.com/nodejs/node/pull/59446
Reviewed-By: Jordan Harband <ljharb@gmail.com >
2025-11-19 18:17:41 +01:00
Shima Ryuhei
2a11d50526
module: correctly detect top-level await in ambiguous contexts
...
Fixes: https://github.com/nodejs/node/issues/58331
PR-URL: https://github.com/nodejs/node/pull/58646
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2025-11-19 18:17:40 +01:00
Lee Jiho
a7a109f926
test: fix typos
...
PR-URL: https://github.com/nodejs/node/pull/59330
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
2025-11-19 18:01:43 +01:00
Sungwon
bc3ffbd713
test_runner: fix isSkipped check in junit
...
The `isSkipped` function in the JUnit reporter was incorrectly
checking for `node?.attrs.failures` instead of `node?.attrs.skipped`.
PR-URL: https://github.com/nodejs/node/pull/59414
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2025-11-19 18:01:43 +01:00
René
20616f1750
http2: do not crash on mismatched ping buffer length
...
PR-URL: https://github.com/nodejs/node/pull/60135
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-11-19 16:00:59 +01:00
Rafael Gonzaga
9eb94232c8
lib: handle superscript variants on windows device
...
Windows recognizes the 8-bit [ISO/IEC 8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1 )
superscript digits ¹, ², and ³ as digits and treats them as
valid parts of COM# and LPT# device names, making them reserved
in every directory.
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs/node/pull/59261
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-11-19 15:54:32 +01:00
Antoine du Hamel
fd9d43da46
test: skip failing test on macOS 15.7+
...
PR-URL: https://github.com/nodejs/node/pull/60419
Refs: https://github.com/nodejs/node/issues/60050
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Richard Lau <richard.lau@ibm.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2025-11-13 12:04:43 +00:00
Marco Ippolito
5e97719860
test: skip test-http-imports on macos
...
PR-URL: https://github.com/nodejs/node/pull/59745
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2025-09-03 15:06:35 +02:00
Chengzhong Wu
cdf985071f
lib: suppress source map lookup exceptions
...
When the source map data are invalid json strings, skip construct
`SourceMap` on it. Additionally, suppress exceptions on source map
lookups and fix test runners crash on invalid source maps.
PR-URL: https://github.com/nodejs/node/pull/56299
Backport-PR-URL: https://github.com/nodejs/node/pull/59653
Refs: https://github.com/nodejs/node/issues/56296
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2025-09-02 15:28:38 +02:00
Michaël Zasso
69c43bdfcc
test: fix internet/test-dns
...
The `nodejs.org` domain has now two TXT records.
Do not verify the exact number of records returned (only their shape),
and check that one of them is the SPF.
PR-URL: https://github.com/nodejs/node/pull/59660
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-09-01 09:00:15 +02:00
Filip Skokan
068c439552
crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4
...
Reverts: https://github.com/nodejs/node/pull/56160
Fixes: https://github.com/nodejs/node/issues/56159
Fixes: https://github.com/nodejs/node/issues/58913
Refs: https://github.com/nodejs/node/pull/58121
PR-URL: https://github.com/nodejs/node/pull/58942
Backport-PR-URL: https://github.com/nodejs/node/pull/58961
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2025-08-27 19:20:45 +02:00
Joyee Cheung
fad773cede
module: throw error when re-runing errored module jobs
...
Re-evaluating an errored ESM should lead to rejecting
the rejection again - this is also the case when importing
it twice. In the case of retrying with
require after import, just throw the cached error.
Drive-by: add some debug logs.
PR-URL: https://github.com/nodejs/node/pull/58957
Backport-PR-URL: https://github.com/nodejs/node/pull/59504
Fixes: https://github.com/nodejs/node/issues/58945
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Refs: https://github.com/nodejs/node/issues/52697
2025-08-27 19:20:44 +02:00
Joyee Cheung
2531185423
module: allow cycles in require() in the CJS handling in ESM loader
...
When --import is used, the ESM loader is used to handle even pure
CJS entry points, and it can run into CJS module facades in the
evaluating state when the parent CJS module is being evaluated.
In this case it should be allowed, since the ESM <-> CJS cycles
that are meant to be disallowed (for the time being) should
already be detected before evaluation and wouldn't get here,
and CJS <-> CJS cycles are fine.
PR-URL: https://github.com/nodejs/node/pull/58598
Backport-PR-URL: https://github.com/nodejs/node/pull/59504
Fixes: https://github.com/nodejs/node/issues/58515
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Refs: https://github.com/nodejs/node/issues/52697
2025-08-27 19:20:44 +02:00
Carlos Espa
ed43b69689
module: clarify cjs global-like error on ModuleJobSync
...
PR-URL: https://github.com/nodejs/node/pull/56491
Backport-PR-URL: https://github.com/nodejs/node/pull/59504
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Refs: https://github.com/nodejs/node/issues/52697
2025-08-27 19:20:44 +02:00
Joyee Cheung
6e02db1b12
module: handle instantiated async module jobs in require(esm)
...
When require(esm) encounters a cached module job that is instantiated
but not yet evaluated, run the evaluation. This catches an edge case
previously missed in https://github.com/nodejs/node/pull/57187 .
PR-URL: https://github.com/nodejs/node/pull/58067
Backport-PR-URL: https://github.com/nodejs/node/pull/59504
Fixes: https://github.com/nodejs/node/issues/58061
Reviewed-By: Jacob Smith <jacob@frende.me >
Refs: https://github.com/nodejs/node/issues/52697
2025-08-27 19:20:44 +02:00
Joyee Cheung
ba7f8a0353
module: improve error message from asynchronicity in require(esm)
...
- Improve the error message that shows up when there is a race
from doing require(esm) and import(esm) at the same time.
- Improve error message of ERR_REQUIRE_ASYNC_MODULE by showing
parent and target file names, if available.
Drive-by: split the require(tla) tests since we are modifying
the tests already.
PR-URL: https://github.com/nodejs/node/pull/57126
Backport-PR-URL: https://github.com/nodejs/node/pull/59504
Refs: https://github.com/fisker/prettier-issue-17139
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Refs: https://github.com/nodejs/node/issues/52697
2025-08-27 19:20:43 +02:00
Shima Ryuhei
65b1669936
util: fix formatting of objects with built-in Symbol.toPrimitive
...
Fixes: https://github.com/nodejs/node/issues/57818
PR-URL: https://github.com/nodejs/node/pull/57832
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-08-27 19:20:41 +02:00
HEESEUNG
8a29f13bec
util: fix parseEnv incorrectly splitting multiple ‘=‘ in value
...
Previously, parseEnv would create multiple environment
variables if a single line contained multiple ‘=‘ characters
(e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }).
This commit ensures that only the first ‘=‘ is used as
the key-value delimiter, and the rest of the line is treated
as the value.
Fixes: https://github.com/nodejs/node/issues/57411
PR-URL: https://github.com/nodejs/node/pull/57421
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-08-27 19:20:40 +02:00
Ruben Bridgewater
077d5020c4
v8: fix missing callback in heap utils destroy
...
This fixes the v8.getHeapSnapshot() calls not properly being
destroyed. Pipeline calls would for example not properly end
without the callback being in place.
PR-URL: https://github.com/nodejs/node/pull/58846
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com >
2025-08-27 19:20:40 +02:00
Tobias Nießen
cbec07ea0b
src: fix FIPS init error handling
...
If `--enable-fips` or `--force-fips` fails to be applied during
`ProcessFipsOptions()`, the node process might exit with
`ExitCode::kNoFailure` because `ERR_GET_REASON(ERR_peek_error())` can
return `0` since `ncrypto::testFipsEnabled()` does not populate the
OpenSSL error queue.
You can likely test this locally by running
node --enable-fips && echo $?
with the current `node` binary from the main branch if compiled without
support for FIPS.
As confirmed by the `XXX` comment here, which was added three years ago
in commit b697160256 , even if the error
queue was populated properly, the OpenSSL reason codes are not really
related to the Node.js `ExitCode` enumeration.
PR-URL: https://github.com/nodejs/node/pull/58379
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2025-08-27 19:20:39 +02:00
Dario Piotrowicz
7ba44290bf
repl: fix tab completion not working with computer string properties
...
PR-URL: https://github.com/nodejs/node/pull/58709
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-08-27 19:20:38 +02:00
Daniel Venable
611a147b45
readline: fix unresolved promise on abortion
...
Fixes: https://github.com/nodejs/node/issues/53497
PR-URL: https://github.com/nodejs/node/pull/54030
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-08-27 19:20:38 +02:00
Aditi
41f3dfd21b
module: fix require.resolve() crash on non-string paths
...
Previously, `require.resolve()` could crash when:
- The first parameter was a relative path and
- The `paths` array contained non-string entries
This commit fixes the issue by adding a check in
`Module._findPath` to ensure all elements in `paths`
are strings, and adding a validation in `stat` before
calling `InternalModuleStat` to guard against
non-string filenames.
PR-URL: https://github.com/nodejs/node/pull/56942
Fixes: https://github.com/nodejs/node/issues/47698
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-08-27 19:20:37 +02:00
James M Snell
faa08b14ed
lib: fixup incorrect argument order in assertEncoding
...
PR-URL: https://github.com/nodejs/node/pull/57177
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-08-27 19:20:37 +02:00
hanguanqiang
ff5cf8a428
http2: fix check for frame->hd.type
...
According to the comment, this should be checking whether
`frame->hd.type` is `NGHTTP2_GOAWAY`, i.e. `0x07` and not `0x03`.
PR-URL: https://github.com/nodejs/node/pull/57644
Refs: https://github.com/nodejs/node/commit/1b693fa03a0d36bc1dc9ec8d95060e3e5ceeee7b
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2025-08-27 19:20:37 +02:00
Chengzhong Wu
34ae9f8b18
vm: import call should return a promise in the current context
...
A `import` call should returns a promise created in the context where
the `import` was called, not the context of `importModuleDynamically`
callback.
PR-URL: https://github.com/nodejs/node/pull/58309
Fixes: https://github.com/nodejs/node/issues/53575
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2025-08-27 19:20:36 +02:00
Marco Ippolito
9991788e4a
http: coerce content-length to number
...
PR-URL: https://github.com/nodejs/node/pull/57458
Fixes: https://github.com/nodejs/node/issues/57456
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-08-27 19:20:36 +02:00
Joyee Cheung
c647aa4b30
build: fix pointer compression builds
...
- Remove usage of deprecated V8::InitializeSandbox().
- External code space and pointer compression shared cage must
be enabled when pointer compression builds are enabled.
- We cannot enable the sandbox because that requires allocating
the array buffer backing stores in the sandbox - we currently
have many backing stores tied to pointers from C++ land that
are not even necessarily dynamic (e.g. in static storage).
Until we manage to get rid of all those, sandbox cannot be
enabled. Note that enabling pointer compression without
enabling sandbox is unsupported by V8, and can be broken
at any time.
PR-URL: https://github.com/nodejs/node/pull/58171
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-27 19:20:35 +02:00
Dario Piotrowicz and Xuguang Mei
edff105c34
debugger: fix behavior of plain object exec in debugger repl
...
Co-authored-by: Xuguang Mei <meixuguang@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/57498
Fixes: https://github.com/nodejs/node/issues/46808
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Xuguang Mei <meixuguang@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-08-27 19:20:35 +02:00
Aditi
14fcfc242b
doc: add a note about require('../common') in testing documentation
...
PR-URL: https://github.com/nodejs/node/pull/56953
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2025-08-27 19:20:30 +02:00
Michael Dawson
43e3f9b26b
deps: update cjs-module-lexer to 2.0.0
...
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/56855
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2025-08-27 19:20:15 +02:00
Rafael Gonzaga
9b74e9bfd9
permission: ignore internalModuleStat on module loading
...
This improves Permission Model usage when allowing read access to
specifi modules. To achieve that, the permission model check on
internalModuleStat has been removed meaning that on module loading,
uv_fs_stat is performed on files and folders even when the permission
model is enabled. Although a uv_fs_stat is performed, reading/executing
the module will still pass by the permission model check.
Without this PR when an app tries to --allow-fs-read=./a.js
--allow-fs-read=./b.js where `a` attempt to load b, it will fails as
it reads $pwd and no permission has been given to this path.
PR-URL: https://github.com/nodejs/node/pull/55797
Backport-PR-URL: https://github.com/nodejs/node/pull/58185
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
2025-08-27 19:20:13 +02:00
Ethan Arrowood
182ae67233
dns: fix dns query cache implementation
...
PR-URL: https://github.com/nodejs/node/pull/58404
Refs: https://github.com/nodejs/node/pull/57640
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tim Perry <pimterry@gmail.com >
2025-08-14 12:21:55 +02:00
Fedor Indutny
fee082d684
deps: update llhttp to 9.3.0
...
llhttp@9.3.0 optimizes header value parsing on ARM Neon/WASM, and adds
support for a protocol callback for use outside of the typical HTTP
setting (RTSP/ICE).
PR-URL: https://github.com/nodejs/node/pull/58144
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2025-08-14 12:14:21 +02:00
RafaelGSS
db7b93fcef
lib: handle all windows reserved driver name
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs-private/node-private/pull/721
Refs: https://hackerone.com/reports/3160912
CVE-ID: CVE-2025-27210
2025-07-11 15:37:10 -03:00
Marco Ippolito
850192b06b
test: skip broken sea on rhel8
...
PR-URL: https://github.com/nodejs/node/pull/58761
Refs: https://github.com/nodejs/node/pull/58588
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2025-06-20 07:19:30 +02:00