RafaelGSS
d8ccfe9ad4
policy: handle Module.constructor and main.extensions bypass
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs-private/node-private/pull/445
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1960870
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=2043807
CVE-ID: CVE-2023-32002,CVE-2023-32006
2023-08-08 10:00:22 -03:00
Tobias Nießen
242aaa0caa
policy: disable process.binding() when enabled
...
process.binding() can be used to trivially bypass restrictions imposed
through a policy. Since the function is deprecated already, simply
replace it with a stub when a policy is being enabled.
Fixes: https://hackerone.com/bugs?report_id=1946470
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
CVE-ID: CVE-2023-32559
PR-URL: https://github.com/nodejs-private/node-private/pull/459
2023-08-08 09:59:12 -03:00
Michaël Zasso
b77000f4d7
test: allow SIGBUS in signal-handler abort test
...
FreeBSD uses SIGBUS after update to v12.4.
Refs: https://github.com/nodejs/build/issues/3134
PR-URL: https://github.com/nodejs/node/pull/47851
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2023-06-19 15:50:27 -03:00
Tobias Nießen
5a92ea7a3b
crypto: handle cert with invalid SPKI gracefully
...
When attempting to convert the SPKI of a X509Certificate to a KeyObject,
throw an error if the subjectPublicKey cannot be parsed instead of
aborting the process.
Fixes: https://hackerone.com/bugs?report_id=1884159
PR-URL: https://github.com/nodejs-private/node-private/pull/393/
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
CVE-ID: CVE-2023-30588
2023-06-19 15:50:27 -03:00
Paolo Insogna
e42ff4b018
http: disable request smuggling via empty headers
...
PR-URL: https://github.com/nodejs-private/node-private/pull/429
Refs: https://github.com/nodejs-private/node-private/pull/427
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
CVE-ID: CVE-2023-30589
2023-06-19 09:21:06 -03:00
Tobias Nießen
1a5c9284eb
doc,test: clarify behavior of DH generateKeys
...
The DiffieHellman class is an old and thin wrapper around certain
OpenSSL functions, many of which are deprecated in OpenSSL 3.0. Because
the Node.js API mirrors the OpenSSL API, it adopts some of its
peculiarities, but the Node.js documentation does not properly reflect
these. Most importantly, despite the documentation saying otherwise,
diffieHellman.generateKeys() does not generate a new private key when
one has already been set or generated. Based on the documentation alone,
users may be led to misuse the API in a way that results in key reuse,
which can have drastic negative consequences for subsequent operations
that consume the shared secret.
These design issues in this old API have been around for many years, and
we are not currently aware of any misuse in the ecosystem that falls
into the above scenario. Changing the behavior of the API would be a
significant breaking change and is thus not appropriate for a security
release (nor is it a goal.) The reported issue is treated as CWE-1068
(after a vast amount of uncertainty whether to treat it as a
vulnerability at all), therefore, this change only updates the
documentation to match the actual behavior. Tests are also added that
demonstrate this particular oddity.
Newer APIs exist that can be used for some, but not all, Diffie-Hellman
operations (e.g., crypto.diffieHellman() that was added in 2020). We
should keep modernizing crypto APIs, but that is a non-goal for this
security release.
The ECDH class mirrors the DiffieHellman class in many ways, but it does
not appear to be affected by this particular peculiarity. In particular,
ecdh.generateKeys() does appear to always generate a new private key.
PR-URL: https://github.com/nodejs-private/node-private/pull/426
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
CVE-ID: CVE-2023-30590
2023-06-19 09:21:06 -03:00
RafaelGSS
a6f4e87bc9
policy: handle mainModule.__proto__ bypass
...
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/418
PR-URL: https://github.com/nodejs-private/node-private/pull/416
Fixes: https://hackerone.com/bugs?subject=nodejs&report_id=1877919
Reviewed-By: Rich Trott <rtrott@gmail.com >
CVE-ID: CVE-2023-30581
2023-06-19 09:20:33 -03:00
Vita Batrla
d081032a60
test: fix test-net-connect-reset-until-connected
...
Fixes: https://github.com/nodejs/node/issues/43446
PR-URL: https://github.com/nodejs/node/pull/46781
Reviewed-By: theanarkh <theratliter@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-03-27 17:28:54 +01:00
Rich Trott
086bb2f8d4
Revert "src: let http2 streams end after session close"
...
This reverts commit dee882e94f .
Moved the test that demonstrated what this commit was fixing to the
`known_issues` folder.
Fixes: https://github.com/nodejs/node/issues/46234
PR-URL: https://github.com/nodejs/node/pull/46721
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2023-03-27 16:41:21 +01:00
Richard Lau and Anna Henningsen
de6dd67790
crypto: avoid hang when no algorithm available
...
Avoid an endless loop if no algorithm is available to seed the
cryptographically secure pseudorandom number generator (CSPRNG).
Co-authored-by: Anna Henningsen <anna@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/46237
Fixes: https://github.com/nodejs/node/issues/46200
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2023-03-27 13:03:21 +01:00
Ben Noordhuis
4617512788
crypto: ensure auth tag set for chacha20-poly1305
...
Because OpenSSL v1.x doesn't do that by itself (OpenSSL v3.x does.)
Fixes: https://github.com/nodejs/node/issues/45874
PR-URL: https://github.com/nodejs/node/pull/46185
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-03-27 13:02:52 +01:00
MURAKAMI Masahiko
809371a15f
module: require.resolve.paths returns null with node schema
...
require.resolve.paths should returns null with builtin module.
when builtin module without `node:` schema, `paths` returns null.
But, it don't return null when builtin module with `node:` schema.
Fixes: https://github.com/nodejs/node/issues/45001
PR-URL: https://github.com/nodejs/node/pull/45147
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-03-27 13:02:09 +01:00
Antoine du Hamel
efe1be47ec
test: skip test depending on overlapped-checker when not available
...
PR-URL: https://github.com/nodejs/node/pull/45015
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-03-27 13:01:47 +01:00
Geoffrey Booth
fc47d58abe
test: remove cjs loader from stack traces
...
PR-URL: https://github.com/nodejs/node/pull/44197
Backport-PR-URL: https://github.com/nodejs/node/pull/46535
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2023-03-27 11:19:02 +01:00
Filip Skokan
cf76d0790d
test: fix WPT title when no META title is present
...
PR-URL: https://github.com/nodejs/node/pull/46804
Backport-PR-URL: https://github.com/nodejs/node/pull/46768
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2023-03-23 20:03:28 +00:00
Filip Skokan
0d1485b924
test: fix default WPT titles
...
PR-URL: https://github.com/nodejs/node/pull/46778
Backport-PR-URL: https://github.com/nodejs/node/pull/46768
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-03-23 20:03:10 +00:00
Filip Skokan
088e9cde3d
test: add WPTRunner support for variants and generating WPT reports
...
PR-URL: https://github.com/nodejs/node/pull/46498
Backport-PR-URL: https://github.com/nodejs/node/pull/46768
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2023-03-23 20:02:47 +00:00
Richard Lau
908c4dff44
test: mark test-crypto-key-objects flaky on Linux
...
PR-URL: https://github.com/nodejs/node/pull/46684
Refs: https://github.com/nodejs/node/issues/46683
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com >
2023-02-18 21:46:01 -05:00
RafaelGSS
f95ef064f4
lib: makeRequireFunction patch when experimental policy
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/372
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1747642
CVE-ID: CVE-2023-23918
PR-URL: https://github.com/nodejs-private/node-private/pull/358
Reviewed-by: Bradley Farias <bradley.meck@gmail.com >
Reviewed-by: Michael Dawson <midawson@redhat.com >
2023-02-15 18:08:34 +00:00
RafaelGSS and Bradley Farias
b02d895137
policy: makeRequireFunction on mainModule.require
...
Co-authored-by: Bradley Farias <bradley.meck@gmail.com >
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/372
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1747642
CVE-ID: CVE-2023-23918
PR-URL: https://github.com/nodejs-private/node-private/pull/358
Reviewed-by: Bradley Farias <bradley.meck@gmail.com >
Reviewed-by: Michael Dawson <midawson@redhat.com >
2023-02-15 18:08:34 +00:00
RafaelGSS
b558e9f476
crypto: clear OpenSSL error on invalid ca cert
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
CVE-ID: CVE-2023-23919
PR-URL: https://github.com/nodejs-private/node-private/pull/375
Refs: https://hackerone.com/bugs?report_id=1808596
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2023-02-14 17:00:17 +00:00
Filip Skokan
160adb7ffc
crypto: clear OpenSSL error queue after calling X509_check_private_key()
...
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/375
CVE-ID: CVE-2023-23919
Fixes: https://github.com/nodejs/node/issues/45485
PR-URL: https://github.com/nodejs/node/pull/45495
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1808596
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2023-02-14 16:59:57 +00:00
Takuro Sato
d0ece30948
crypto: clear OpenSSL error queue after calling X509_verify()
...
Prior to this commit, functions accessing the OpenSSL error queue did
not work properly after x509.verify() returned false.
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/375
CVE-ID: CVE-2023-23919
PR-URL: https://github.com/nodejs/node/pull/45377
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1808596
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2023-02-14 16:58:41 +00:00
Richard Lau
d7f83c420c
test: avoid left behind child processes
...
Extend the Linux logic to all POSIX platforms in
test-child-process-exec-abortcontroller-promisified.
PR-URL: https://github.com/nodejs/node/pull/46276
Fixes: https://github.com/nodejs/build/issues/3154
Refs: https://github.com/nodejs/node/issues/37518
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com >
Reviewed-By: Ruy Adorno <ruyadorno@google.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-01-22 14:20:29 -05:00
Joyee Cheung
fbc52e5729
src: disambiguate terms used to refer to builtins and addons
...
The term "native module" dates back to some of the oldest code
in the code base. Within the context of Node.js core it usually
refers to modules that are native to Node.js (e.g. fs, http),
but it can cause confusion for people who don't work on this
part of the code base, as "native module" can also refer to
native addons - which is even the case in some of the API
docs and error messages.
This patch tries to make the usage of these terms more consistent.
Now within the context of Node.js core:
- JavaScript scripts that are built-in to Node.js are now referred
to as "built-in(s)". If they are available as modules,
they can also be referred to as "built-in module(s)".
- Dynamically-linked shared objects that are loaded into
the Node.js processes are referred to as "addons".
We will try to avoid using the term "native modules" because it could
be ambiguous.
Changes in this patch:
File names:
- node_native_module.h -> node_builtins.h,
- node_native_module.cc -> node_builtins.cc
C++ binding names:
- `native_module` -> `builtins`
`node::Environment`:
- `native_modules_without_cache` -> `builtins_without_cache`
- `native_modules_with_cache` -> `builtins_with_cache`
- `native_modules_in_snapshot` -> `builtins_in_cache`
- `native_module_require` -> `builtin_module_require`
`node::EnvSerializeInfo`:
- `native_modules` -> `builtins
`node::native_module::NativeModuleLoader`:
- `native_module` namespace -> `builtins` namespace
- `NativeModuleLoader` -> `BuiltinLoader`
- `NativeModuleRecordMap` -> `BuiltinSourceMap`
- `NativeModuleCacheMap` -> `BuiltinCodeCacheMap`
- `ModuleIds` -> `BuiltinIds`
- `ModuleCategories` -> `BuiltinCategories`
- `LoadBuiltinModuleSource` -> `LoadBuiltinSource`
`loader.js`:
- `NativeModule` -> `BuiltinModule` (the `NativeModule` name used in
`process.moduleLoadList` is kept for compatibility)
And other clarifications in the documentation and comments.
PR-URL: https://github.com/nodejs/node/pull/44135
Backport-PR-URL: https://github.com/nodejs/node/pull/45663
Fixes: https://github.com/nodejs/node/issues/44036
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
2022-12-08 09:55:24 -05:00
Santiago Gimeno
953072d3db
src: let http2 streams end after session close
...
After the stream has been marked as closed by the nghttp2 stack, there
might be still pending data to be sent: trailing headers is an example
of this. In that case, avoid reentering the nghttp2 stack synchronously
to allow the data to be written before actually closing the stream.
Fixes: https://github.com/nodejs/node/issues/42713
PR-URL: https://github.com/nodejs/node/pull/45153
Backport-PR-URL: https://github.com/nodejs/node/pull/45660
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2022-12-08 09:19:00 -05:00
Richard Lau
6733556783
test: add test to validate changelogs for releases
...
Add a new test to check that the changelog files have been correctly
updated for releases.
PR-URL: https://github.com/nodejs/node/pull/45325
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2022-12-07 11:11:10 -05:00
Pierrick Bouvier
821d832cef
test: mark test-watch-mode* as flaky on all platforms
...
This was confirmed flaky on those platforms:
- Windows x64
- Windows on Arm
- Linux
- Freebsd
Tests randomly fail because of bad order in messages expected, which
seems related to threads scheduling at execution.
PR-URL: https://github.com/nodejs/node/pull/45049
Backport-PR-URL: https://github.com/nodejs/node/pull/44873
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-12-07 09:07:17 -05:00
Moshe Atlow
64d343af74
test_runner: support using --inspect with --test
...
PR-URL: https://github.com/nodejs/node/pull/44520
Backport-PR-URL: https://github.com/nodejs/node/pull/44873
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-12-07 09:05:04 -05:00
Moshe Atlow
37e909251c
test_runner: support programmatically running --test
...
PR-URL: https://github.com/nodejs/node/pull/44241
Backport-PR-URL: https://github.com/nodejs/node/pull/44873
Fixes: https://github.com/nodejs/node/issues/44023
Fixes: https://github.com/nodejs/node/issues/43675
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-12-07 09:04:55 -05:00
Richard Lau
5a776d4a69
deps: update timezone to 2022f
...
PR-URL: https://github.com/nodejs/node/pull/45613
Refs: https://github.com/nodejs/node/pull/45289
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2022-12-07 08:54:50 -05:00
Darshan Sen
197df63f74
test: add a test to ensure the correctness of timezone upgrades
...
Currently, there's no way to know if a timezone upgrade PR is correct
without building and testing the change locally. This change provides a
solution for that.
Tested in https://github.com/RaisinTen/node/pull/4 .
Signed-off-by: Darshan Sen <raisinten@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/45299
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-11-24 10:48:27 -05:00
theanarkh
33707dcd03
dgram: add dgram send queue info
...
PR-URL: https://github.com/nodejs/node/pull/44149
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2022-11-24 10:26:20 -05:00
Manuel Spigolon
8c73279ebb
util: add default value option to parsearg
...
Users can set a default
value for every expected
input argument
PR-URL: https://github.com/nodejs/node/pull/44631
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-11-24 09:28:33 -05:00
Michael Dawson
5a0efa05d2
node-api: handle no support for external buffers
...
Refs: https://github.com/electron/electron/issues/35801
Refs: https://github.com/nodejs/abi-stable-node/issues/441
Electron recently dropped support for external
buffers. Provide a way for addon authors to:
- hide the methods to create external buffers so they can
avoid using them if they want the broadest compatibility.
- call the methods that create external buffers at runtime
to check if external buffers are supported and either
use them or not based on the return code.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/45181
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2022-11-24 08:15:35 -05:00
legendecas
54608d8dc3
src: split property helpers from node::Environment
...
PR-URL: https://github.com/nodejs/node/pull/44056
Backport-PR-URL: https://github.com/nodejs/node/pull/44542
Refs: https://github.com/nodejs/node/issues/42528
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Feng Yu <F3n67u@outlook.com >
2022-11-24 07:27:20 -05:00
Richard Lau
42e9d8016a
test: fix textdecoder test for small-icu builds
...
The `Shift_JIS` encoding may not be available, e.g. when Node.js is
configured with `--with-intl=small-icu`.
PR-URL: https://github.com/nodejs/node/pull/45225
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: Steven R Loomis <srloomis@us.ibm.com >
2022-11-23 21:42:56 -05:00
Moshe Atlow
6d736a56d8
test: fix watch mode test flake
...
PR-URL: https://github.com/nodejs/node/pull/44739
Backport-PR-URL: https://github.com/nodejs/node/pull/44976
Fixes: https://github.com/nodejs/node/issues/44735
Reviewed-By: Erick Wendel <erick.workspace@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-11-23 14:47:19 -05:00
Moshe Atlow
543d3d2bf3
test: deflake watch mode tests
...
PR-URL: https://github.com/nodejs/node/pull/44621
Backport-PR-URL: https://github.com/nodejs/node/pull/44976
Fixes: https://github.com/nodejs/node/issues/44655
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2022-11-23 14:47:16 -05:00
Moshe Atlow
97f6caf4eb
test: split watch mode inspector tests to sequential
...
PR-URL: https://github.com/nodejs/node/pull/44551
Backport-PR-URL: https://github.com/nodejs/node/pull/44976
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com >
2022-11-23 14:47:05 -05:00
Moshe Atlow
1e0dcd1ee0
cli: add --watch
...
PR-URL: https://github.com/nodejs/node/pull/44366
Backport-PR-URL: https://github.com/nodejs/node/pull/44976
Fixes: https://github.com/nodejs/node/issues/40429
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2022-11-23 14:46:59 -05:00
Antoine du Hamel
254358c81e
tools: refactor avoid-prototype-pollution lint rule
...
The lint rule was not catching all occurences of unsafe primordials use,
and was too strict on some methods.
PR-URL: https://github.com/nodejs/node/pull/43476
Backport-PR-URL: https://github.com/nodejs/node/pull/44926
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2022-11-23 12:07:03 -05:00
Antoine du Hamel
499750ff7a
test: update list of known globals
...
This is important to allow to run v16 doc tests on more recent versions.
PR-URL: https://github.com/nodejs/node/pull/45255
Refs: https://github.com/nodejs/node/actions/runs/3356902660/jobs/5562322617
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com >
2022-11-04 16:25:28 +00:00
Tobias Nießen
9ffddd7098
inspector: harden IP address validation again
...
Use inet_pton() to parse IP addresses, which restricts IP addresses
to a small number of well-defined formats. In particular, octal and
hexadecimal number formats are not allowed, and neither are leading
zeros. Also explicitly reject 0.0.0.0/8 and ::/128 as non-routable.
Refs: https://hackerone.com/reports/1710652
CVE-ID: CVE-2022-43548
PR-URL: https://github.com/nodejs-private/node-private/pull/354
Reviewed-by: Michael Dawson <midawson@redhat.com >
Reviewed-by: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-by: Rich Trott <rtrott@gmail.com >
2022-11-01 22:56:04 +00:00
Filip Skokan
4ebb3ef508
test,crypto: update WebCryptoAPI WPT
...
PR-URL: https://github.com/nodejs/node/pull/44223
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Feng Yu <F3n67u@outlook.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Backport-PR-URL: https://github.com/nodejs/node/pull/44872
2022-10-11 14:45:30 -05:00
Filip Skokan
317cd051ce
crypto: allow zero-length IKM in HKDF and in webcrypto PBKDF2
...
PR-URL: https://github.com/nodejs/node/pull/44201
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Backport-PR-URL: https://github.com/nodejs/node/pull/44872
2022-10-11 14:45:30 -05:00
Filip Skokan
e5c9975f11
crypto: allow zero-length secret KeyObject
...
PR-URL: https://github.com/nodejs/node/pull/44201
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Backport-PR-URL: https://github.com/nodejs/node/pull/44872
2022-10-11 14:45:30 -05:00
Filip Skokan
7e705d8d74
crypto: fix webcrypto deriveBits validations
...
PR-URL: https://github.com/nodejs/node/pull/44173
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Backport-PR-URL: https://github.com/nodejs/node/pull/44872
2022-10-11 14:45:30 -05:00
Filip Skokan
7ad2a268b9
crypto: fix webcrypto EC key namedCurve validation errors
...
PR-URL: https://github.com/nodejs/node/pull/44172
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Backport-PR-URL: https://github.com/nodejs/node/pull/44872
2022-10-11 14:45:30 -05:00
Filip Skokan
2c938d73ff
crypto: fix webcrypto operation errors to be OperationError
...
PR-URL: https://github.com/nodejs/node/pull/44171
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Backport-PR-URL: https://github.com/nodejs/node/pull/44872
2022-10-11 14:45:30 -05:00