Yagiz Nizipli
e43a4e07ec
src: use starts_with in node_dotenv.cc
...
PR-URL: https://github.com/nodejs/node/pull/53539
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2024-07-16 12:01:02 +02:00
Tobias Nießen
f82e20fdea
crypto: avoid taking ownership of OpenSSL objects
...
It is often unnecessary to obtain (shared) ownership of OpenSSL objects
in this code, and it generally is more costly to do so as opposed to
just obtaining a pointer to the respective OpenSSL object. Therefore,
this patch replaces various OpenSSL function calls that take ownership
with ones that do not.
Refs: https://github.com/nodejs/node/pull/53436
PR-URL: https://github.com/nodejs/node/pull/53460
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-07-16 12:01:02 +02:00
RafaelGSS
bfef7f112a
Working on v22.4.2
...
PR-URL: https://github.com/nodejs-private/node-private/pull/617
2024-07-08 12:53:00 -03:00
RafaelGSS
8512434d2b
2024-07-08, Version 22.4.1 (Current)
...
This is a security release.
Notable changes:
* CVE-2024-36138 - Bypass incomplete fix of CVE-2024-27980 (High)
* CVE-2024-22020 - Bypass network import restriction via data URL (Medium)
* CVE-2024-22018 - fs.lstat bypasses permission model (Low)
* CVE-2024-36137 - fs.fchown/fchmod bypasses permission model (Low)
* CVE-2024-37372 - Permission model improperly processes UNC paths (Low)
PR-URL: https://github.com/nodejs-private/node-private/pull/617
2024-07-06 13:30:46 -03:00
RafaelGSS
09899e6302
src: handle permissive extension on cmd check
...
PR-URL: https://github.com/nodejs-private/node-private/pull/596
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
CVE-ID: CVE-2024-36138
2024-07-06 13:29:23 -03:00
RafaelGSS
5d9c811634
src,permission: fix UNC path resolution
...
PR-URL: https://github.com/nodejs-private/node-private/pull/581
Fixes: https://hackerone.com/bugs?subject=nodejs&report_id=2079103
CVE-ID: CVE-2024-37372
2024-07-06 13:29:23 -03:00
Michaël Zasso
4d076de266
Working on v22.4.1
...
PR-URL: https://github.com/nodejs/node/pull/53583
2024-07-02 10:47:23 +02:00
Michaël Zasso
7e13cc5407
2024-07-02, Version 22.4.0 (Current)
...
Notable changes:
deps,lib,src:
* (SEMVER-MINOR) add experimental web storage (Colin Ihrig) https://github.com/nodejs/node/pull/52435
doc:
* move `node --run` stability to rc (Yagiz Nizipli) https://github.com/nodejs/node/pull/53433
* mark WebSocket as stable (Matthew Aitken) https://github.com/nodejs/node/pull/53352
* mark --heap-prof and related flags stable (Joyee Cheung) https://github.com/nodejs/node/pull/53343
* mark --cpu-prof and related flags stable (Joyee Cheung) https://github.com/nodejs/node/pull/53343
* doc-only deprecate OpenSSL engine-based APIs (Richard Lau) https://github.com/nodejs/node/pull/53329
inspector:
* fix disable async hooks on Debugger.setAsyncCallStackDepth (Joyee Cheung) https://github.com/nodejs/node/pull/53473
lib:
* (SEMVER-MINOR) add diagnostics_channel events to module loading (RafaelGSS) https://github.com/nodejs/node/pull/44340
util:
* (SEMVER-MINOR) support `--no-` for argument with boolean type for parseArgs (Zhenwei Jin) https://github.com/nodejs/node/pull/53107
PR-URL: https://github.com/nodejs/node/pull/53583
2024-07-01 15:33:39 +02:00
James M Snell
70bbc02dac
src, deps: add nbytes library
...
Projects that seek to implement Node.js compatible APIs end up
needed to reproduce various bits of functionality internally in
order to faithfully replicate the Node.js behaviors. This is
particularly true for things like byte manipulation, base64 and
hex encoding, and other low-level operations. This change
proposes moving much of this low-level byte manipulation code
out of nodejs/src and into a new `nbytes` library. Initially this
new library will exist in the `deps` directory but the intent is
to spin out a new separate repository to be its home in the future.
Doing so will allow other projects to use the nbytes library with
exactly the same implementation as Node.js.
This commit moves only the byte swapping and legacy base64 handling
code. Additional commits will move additional byte manipulation
logic into the library.
PR-URL: https://github.com/nodejs/node/pull/53507
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-06-25 10:52:38 +02:00
Richard Lau
49cfb9d001
src: reset process.versions during pre-execution
...
Reset `process.versions` during pre-execution so that it reflects
the versions at run-time rather than when the snapshot was taken.
PR-URL: https://github.com/nodejs/node/pull/53444
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-06-21 11:05:40 +02:00
Michaël Zasso
15df4edd22
src: use args.This() instead of Holder
...
The latter is deprecated in V8.
Refs: http://crbug.com/333672197
PR-URL: https://github.com/nodejs/node/pull/53474
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2024-06-20 15:38:16 +02:00
cjihrig
9e30724b53
deps,lib,src: add experimental web storage
...
This commit introduces an experimental implementation of the Web
Storage API using SQLite as the backing data store.
PR-URL: https://github.com/nodejs/node/pull/52435
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2024-06-20 15:38:01 +02:00
Yagiz Nizipli and Daniel Lemire
105b006fd2
fs: move ToNamespacedPath to c++
...
Co-Authored-By: Daniel Lemire <daniel@lemire.me >
PR-URL: https://github.com/nodejs/node/pull/52135
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-06-20 14:45:27 +02:00
Node.js GitHub Bot
e69b8d202c
deps: update undici to 6.19.2
...
PR-URL: https://github.com/nodejs/node/pull/53468
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-20 14:45:25 +02:00
Node.js GitHub Bot
fa34f8fcf0
deps: update undici to 6.19.1
...
PR-URL: https://github.com/nodejs/node/pull/53468
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-20 14:45:25 +02:00
Node.js GitHub Bot
0b40bfad43
deps: update undici to 6.19.0
...
PR-URL: https://github.com/nodejs/node/pull/53468
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-20 14:45:24 +02:00
Joyee Cheung
ad5282e196
inspector: fix disable async hooks on Debugger.setAsyncCallStackDepth
...
This was previously calling the enable function by mistake. As a
result, when profiling using Chrome DevTools, the async hooks won't
be turned off properly after receiving Debugger.setAsyncCallStackDepth
with depth 0.
PR-URL: https://github.com/nodejs/node/pull/53473
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-06-20 14:45:18 +02:00
Richard Lau
e16a04e852
src: fix dynamically linked OpenSSL version
...
Report the version of OpenSSL that Node.js is running with instead
of the version of OpenSSL that Node.js was compiled against.
PR-URL: https://github.com/nodejs/node/pull/53456
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2024-06-20 14:45:18 +02:00
Tobias Nießen
a11a05763d
tls: check result of SSL_CTX_set_*_proto_version
...
These functions generally should not fail, but we also shouldn't ignore
potential failures entirely since security properties of the application
might depend on successful configuration.
This also is consistent with the existing CHECKs in SetMinProto() and
SetMaxProto().
PR-URL: https://github.com/nodejs/node/pull/53459
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-06-20 14:45:16 +02:00
Tobias Nießen
dfdc062111
buffer: make indexOf(byte) faster
...
Add a V8 fast API implementation for indexOfNumber, which significantly
improves the performance of finding a single byte within a buffer.
Refs: https://github.com/nodejs/node/pull/52993
PR-URL: https://github.com/nodejs/node/pull/53455
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2024-06-20 14:45:15 +02:00
Yagiz Nizipli
fad179307c
fs: add fast api for InternalModuleStat
...
PR-URL: https://github.com/nodejs/node/pull/51344
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-20 14:45:15 +02:00
Richard Lau
5961253824
src: remove base64 from process.versions
...
The `base64` dependency was previously removed along with the update
script (`tools/dep_updaters/update-base64.sh`) but the generated header,
`src/base64_version.h` was left behind and `process.versions` was still
listing the last version of `base64` that was included in Node.js before
it was removed
Refs: https://github.com/nodejs/node/pull/52714
PR-URL: https://github.com/nodejs/node/pull/53442
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-06-20 14:45:15 +02:00
Yagiz Nizipli
11dd15c0b5
src: remove SetEncoding from StringEncoder
...
PR-URL: https://github.com/nodejs/node/pull/53441
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
2024-06-20 14:45:14 +02:00
Yagiz Nizipli
0c7e69acd2
src: simplify size() == 0 checks
...
PR-URL: https://github.com/nodejs/node/pull/53440
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-06-20 14:45:14 +02:00
Tobias Nießen
4b47f89eb2
tls: avoid taking ownership of OpenSSL objects
...
It is often unnecessary to obtain (shared) ownership of OpenSSL objects
in this code, and it generally is more costly to do so as opposed to
just obtaining a pointer to the respective OpenSSL object. Therefore,
this patch replaces various OpenSSL function calls that take ownership
with ones that do not.
PR-URL: https://github.com/nodejs/node/pull/53436
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-06-20 14:45:14 +02:00
Joyee Cheung
f077afafda
src: add utilities to help debugging reproducibility of snapshots
...
- Print offsets in blob serializer
- Add a special node:generate_default_snapshot ID to generate
the built-in snapshot.
- Improve logging
- Add a test to check the reproducibilty of the snapshot
PR-URL: https://github.com/nodejs/node/pull/50983
Refs: https://github.com/nodejs/build/issues/3043
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-06-20 14:40:46 +02:00
Joyee Cheung
004b9ea4c4
src: make sure that memcpy-ed structs in snapshot have no padding
...
To make the snapshots reproducible, this patch updates the size
of a few types and adds some static assertions to ensure that
there are no padding in the memcpy-ed structs.
PR-URL: https://github.com/nodejs/node/pull/50983
Refs: https://github.com/nodejs/build/issues/3043
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-06-20 14:40:46 +02:00
Joyee Cheung
bfc5236423
src: return non-empty data in context data serializer
...
For pointer values in the context data, we need to return
non-empty data in the serializer so that V8 does not
serialize them verbatim, making the snapshot unreproducible.
PR-URL: https://github.com/nodejs/node/pull/50983
Refs: https://github.com/nodejs/build/issues/3043
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-06-20 14:40:45 +02:00
EhsanKhaki
955454ba4d
src: fix typo in env.cc
...
PR-URL: https://github.com/nodejs/node/pull/53418
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-06-20 14:40:45 +02:00
Node.js GitHub Bot
7a7f438841
deps: update zlib to 1.3.0.1-motley-209717d
...
PR-URL: https://github.com/nodejs/node/pull/53156
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-06-20 14:40:45 +02:00
Tobias Nießen
7d8787768c
src: avoid strcmp in favor of operator==
...
PR-URL: https://github.com/nodejs/node/pull/53439
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-06-20 14:40:44 +02:00
Tobias Nießen
ac8adeb99f
tls: use SSL_get_peer_tmp_key
...
Both OpenSSL 1.1.1 and 3.x support SSL_get_peer_tmp_key as a replacement
for SSL_get_server_tmp_key. While the old function name still exists as
an alias, it does not accurately reflect the function's behavior
(anymore). Hence, use the new function name here.
PR-URL: https://github.com/nodejs/node/pull/53366
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
2024-06-20 14:40:44 +02:00
Shu-yu Guo
599e7c3d8e
src: remove ArrayBufferAllocator::Reallocate override
...
It's being deprecated and removed in V8.
PR-URL: https://github.com/nodejs/node/pull/52910
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-06-20 14:40:44 +02:00
Joyee Cheung
f9075ff38e
src: print v8::OOMDetails::detail when it's available
...
This provides a bit more information when V8 runs out of memory.
PR-URL: https://github.com/nodejs/node/pull/53360
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2024-06-20 14:40:42 +02:00
Hüseyin Açacak
4704270443
src: fix IsIPAddress for IPv6
...
Fix the bug when copying IPv6 host to a variable to remove brackets.
Fixes: https://github.com/nodejs/node/issues/47427
PR-URL: https://github.com/nodejs/node/pull/53400
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-06-20 14:40:42 +02:00
Tobias Nießen
82092cdaa3
crypto: improve GetECGroupBits signature
...
Remove the unused ECPointer argument and rename the function since the
current name is misleading.
PR-URL: https://github.com/nodejs/node/pull/53364
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-06-20 14:40:41 +02:00
theanarkh
63f62d76de
src: fix permission inspector crash
...
PR-URL: https://github.com/nodejs/node/pull/53389
Fixes: https://github.com/nodejs/node/issues/53385
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
2024-06-20 14:40:41 +02:00
RafaelGSS
9495a2bf1f
Working on v22.3.1
...
PR-URL: https://github.com/nodejs/node/pull/53379
2024-06-11 15:48:40 -03:00
RafaelGSS
2e7a7765d6
2024-06-11, Version 22.3.0 (Current)
...
Notable changes:
buffer:
* (SEMVER-MINOR) add .bytes() method to Blob (Matthew Aitken) https://github.com/nodejs/node/pull/53221
cli:
* (SEMVER-MINOR) add `NODE_RUN_PACKAGE_JSON_PATH` env (Yagiz Nizipli) https://github.com/nodejs/node/pull/53058
* (SEMVER-MINOR) add `NODE_RUN_SCRIPT_NAME` env to `node --run` (Yagiz Nizipli) https://github.com/nodejs/node/pull/53032
doc:
* (SEMVER-MINOR) add context.assert docs (Colin Ihrig) https://github.com/nodejs/node/pull/53169
* (SEMVER-MINOR) improve explanation about built-in modules (Joyee Cheung) https://github.com/nodejs/node/pull/52762
* add StefanStojanovic to collaborators (StefanStojanovic) https://github.com/nodejs/node/pull/53118
* add Marco Ippolito to TSC (Rafael Gonzaga) https://github.com/nodejs/node/pull/53008
fs:
* mark recursive cp methods as stable (Théo LUDWIG) https://github.com/nodejs/node/pull/53127
lib:
* (SEMVER-MINOR) add EventSource Client (Aras Abbasi) https://github.com/nodejs/node/pull/51575
* (SEMVER-MINOR) replace MessageEvent with undici's (Matthew Aitken) https://github.com/nodejs/node/pull/52370
module:
* (SEMVER-MINOR) print amount of load time of a cjs module (Vinicius Lourenço) https://github.com/nodejs/node/pull/52213
net:
* (SEMVER-MINOR) add new net.server.listen tracing channel (Paolo Insogna) https://github.com/nodejs/node/pull/53136
process:
* (SEMVER-MINOR) add process.getBuiltinModule(id) (Joyee Cheung) https://github.com/nodejs/node/pull/52762
src:
* (SEMVER-MINOR) traverse parent folders while running `--run` (Yagiz Nizipli) https://github.com/nodejs/node/pull/53154
src,permission:
* (SEMVER-MINOR) --allow-wasi & prevent WASI exec (Rafael Gonzaga) https://github.com/nodejs/node/pull/53124
test_runner:
* (SEMVER-MINOR) add snapshot testing (Colin Ihrig) https://github.com/nodejs/node/pull/53169
* (SEMVER-MINOR) add context.fullName (Colin Ihrig) https://github.com/nodejs/node/pull/53169
* (SEMVER-MINOR) support module mocking (Colin Ihrig) https://github.com/nodejs/node/pull/52848
PR-URL: https://github.com/nodejs/node/pull/53379
2024-06-10 09:53:43 -03:00
Yagiz Nizipli
5a41bcf9ca
src: traverse parent folders while running --run
...
PR-URL: https://github.com/nodejs/node/pull/53154
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-06-10 09:30:25 -03:00
Joyee Cheung
cb1329a8cf
src: use v8::(Des|S)erializeInternalFieldsCallback
...
Previously V8 would just try to serialize the context data fields
"verbatim" by copying the pointer values. This patch makes
use of the new callbacks so that at serialization, the embedder
data for the context can at least be serialized in a meaningful
way (which are all reset to empty for now). Otherwise the
upstream may have difficulties serializing these pointer values
"verbatim" especially with the introduction of external pointer
tables, even though the verbatim pointer values from a previous
process is meaningless to Node.js.
For Node.js the callback currently just checks that the slots are
know. We will reassign the pointers with newly created native
structures during deserialization and there isn't much we can
reuse for now.
PR-URL: https://github.com/nodejs/node/pull/53217
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5512712/comments/cfc2b28d_c921ac80?tab=comments
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-06-07 10:37:16 -03:00
Tobias Nießen
34f20983fd
crypto: fix propagation of "memory limit exceeded"
...
When we throw ERR_CRYPTO_INVALID_SCRYPT_PARAMS after a call to
EVP_PBE_scrypt, check if OpenSSL reported an error and if so, append the
OpenSSL error message to the default generic error message. In
particular, this catches cases when `maxmem` is not sufficient, which
otherwise is difficult to identify because our documentation only
provides an approximation of the required `maxmem` value.
Fixes: https://github.com/nodejs/node/issues/53291
PR-URL: https://github.com/nodejs/node/pull/53300
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-06-07 10:37:16 -03:00
Juan José
638b510ce7
cli: add --expose-gc flag available to NODE_OPTIONS
...
This commits allows users to send `--expose-gc` via `NODE_OPTIONS`
environment variable.
Using `node --expose-gc` is possible but via `NODE_OPTIONS` won't
work.
```sh
NODE_OPTIONS='--expose-gc' node
node: --expose-gc is not allowed in NODE_OPTIONS
```
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/53078
Reviewed-By: Tierney Cyren <hello@bnb.im >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2024-06-07 10:37:15 -03:00
Node.js GitHub Bot
4a17dda8dc
deps: update undici to 6.18.2
...
PR-URL: https://github.com/nodejs/node/pull/53255
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-07 10:37:15 -03:00
Matteo Collina
4b9cdea8a6
Revert "module: have a single hooks thread for all workers"
...
This reverts commit 22cb99d073 .
PR-URL: https://github.com/nodejs/node/pull/53183
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2024-06-03 08:48:35 +02:00
Rafael Gonzaga
e26166f30b
src,permission: handle process.chdir on pm
...
PR-URL: https://github.com/nodejs/node/pull/53175
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-06-03 08:48:33 +02:00
Rafael Gonzaga
75e5612fae
src,permission: --allow-wasi & prevent WASI exec
...
PR-URL: https://github.com/nodejs/node/pull/53124
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-06-03 08:48:32 +02:00
cjihrig
8c6dffc269
test_runner: add snapshot testing
...
This commit adds a t.assert.snapshot() method that implements
snapshot testing. Serialization uses JSON.stringify() by default,
but users can configure the serialization to meet their needs.
PR-URL: https://github.com/nodejs/node/pull/53169
Fixes: https://github.com/nodejs/node/issues/48260
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2024-06-01 10:55:09 +02:00
Joyee Cheung
1886fe99af
src: use __FUNCSIG__ on Windows in backtrace
...
To show function signature if possible.
PR-URL: https://github.com/nodejs/node/pull/53135
Refs: https://learn.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=msvc-170
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com >
2024-06-01 10:55:07 +02:00
Chengzhong Wu
fe007cd1b4
lib: allow CJS source map cache to be reclaimed
...
Unifies the CJS and ESM source map cache map with SourceMapCacheMap
and allows the CJS cache entries to be queried more efficiently with
a source url without iteration on an IterableWeakMap.
Add a test to verify that the CJS source map cache entry can be
reclaimed.
PR-URL: https://github.com/nodejs/node/pull/51711
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-06-01 10:55:07 +02:00