Commit Graph
38751 Commits
Author SHA1 Message Date
cjihrig b6fb7914ca test_runner: support coverage of unnamed functions
This commit updates the code coverage logic to skip the first
function in a file (which does not correspond to an actual
function) instead of skipping all functions without a name.

PR-URL: https://github.com/nodejs/node/pull/47652
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-05-02 09:34:03 +02:00
cjihrig 1f120a396f test_runner: move coverage collection to root.postRun()
This commit moves code coverage collection from the test
harness exit handler to the postRun() function of the root
test.

This is necessary preparatory work for supporting
code coverage with --test. The reason is that --test is
implemented on top of run(), and that function calls the root
test's postRun() function, which outputs the test summary. This
happens before the harness exit handler.

PR-URL: https://github.com/nodejs/node/pull/47651
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-05-02 09:34:03 +02:00
Node.js GitHub Bot ccf9c37b43 tools: update lint-md-dependencies to @rollup/plugin-commonjs@24.1.0
PR-URL: https://github.com/nodejs/node/pull/47577
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-05-02 09:34:03 +02:00
Mohammed Keyvanzadeh 78a3503406 doc: fix typos in SECURITY.md
PR-URL: https://github.com/nodejs/node/pull/47677
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-05-02 09:34:02 +02:00
Mert Can Altın 09ff9eafd9 doc,fs: update description of fs.stat() method
PR-URL: https://github.com/nodejs/node/pull/47654
Fixes: https://github.com/nodejs/node/issues/47633
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2023-05-02 09:34:02 +02:00
Tierney Cyren 5b851c8074 build: add devcontainer configuration
PR-URL: https://github.com/nodejs/node/pull/40825
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-05-02 09:34:02 +02:00
James M Snell b8bdaf86c4 lib: disallow file-backed blob cloning
Disallow cloning of file-backed Blobs. If necessary, we can enable
this later but for now we disable it. The reason is because the
underlying FdEntry ends up bound to the Environment/Realm under
which is was created and transfering across worker threads ends up
failing.

Fixes: https://github.com/nodejs/node/issues/47334
PR-URL: https://github.com/nodejs/node/pull/47574
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-05-02 09:34:02 +02:00
Tobias Nießen 0887fa0464 tools: keep PR titles/description up-to-date
Set the `update-pull-request-title-and-body` option when potentially
updating an existing PR with a dynamic title and/or description.

PR-URL: https://github.com/nodejs/node/pull/47621
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-05-02 09:34:02 +02:00
Joyee Cheung 91e4a7cdee loader: use default loader as cascaded loader in the in loader worker
Use the default loader as the cascaded loader in the loader worker.
Otherwise we spawn loader workers in the loader workers indefinitely.

PR-URL: https://github.com/nodejs/node/pull/47620
Fixes: https://github.com/nodejs/node/issues/47566
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-05-02 09:34:02 +02:00
Deokjin Kim 9101630e05 doc: update error code of buffer
According to use of `validateNumber`, error code is changed
from ERR_INVALID_ARG_VALUE to ERR_OUT_OF_RANGE.

Refs: https://github.com/nodejs/node/pull/45796
PR-URL: https://github.com/nodejs/node/pull/47617
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-05-02 09:34:01 +02:00
Richard Lau b8927ddf16 tools: fix updating root certificates
When searching for the latest certdata.txt, check that the file
exists on the remote server.

PR-URL: https://github.com/nodejs/node/pull/47607
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-05-02 09:34:01 +02:00
Moshe Atlow 1391d3b9ff deps: add minimatch as a dependency
PR-URL: https://github.com/nodejs/node/pull/47499
Refs: https://github.com/nodejs/node/pull/47490
Refs: https://github.com/nodejs/node/pull/47486
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
2023-05-02 09:34:01 +02:00
Ethan Arrowood 439ea47a77 fs: add recursive option to readdir and opendir
Adds a naive, linear recursive algorithm for the following methods:
readdir, readdirSync, opendir, opendirSync, and the promise based
equivalents.

Fixes: https://github.com/nodejs/node/issues/34992
PR-URL: https://github.com/nodejs/node/pull/41439
Refs: https://github.com/nodejs/tooling/issues/130
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-05-02 09:34:01 +02:00
Khafra 872e6706ca src: add v8 fast api for url canParse
PR-URL: https://github.com/nodejs/node/pull/47552
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2023-05-02 09:34:01 +02:00
theanarkh 94a5abb1e0 inspector: add tips for Session
PR-URL: https://github.com/nodejs/node/pull/47195
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2023-05-02 09:34:00 +02:00
Mohammed Keyvanzadeh 87cae0cb59 tools: update PR label config
- Update paths to the new ones.
- Remove paths that no longer exist.
- Capitalize comments and quote labels mentioned within.
- Fix syntax error in regex.
- Add missing JavaScript subsystems.

PR-URL: https://github.com/nodejs/node/pull/47593
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-05-02 09:34:00 +02:00
Deokjin Kim 183f0c3e79 doc: change offset of example in Buffer.copyBytesFrom
Actual output is different from expected output if offset is 0.
Plus, removed unused importing `Buffer`.

PR-URL: https://github.com/nodejs/node/pull/47606
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
2023-05-02 09:34:00 +02:00
Filip Skokan 9d3768eb01 Revert "test: run WPT files in parallel again"
This reverts commit c05689ea6b.

PR-URL: https://github.com/nodejs/node/pull/47627
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2023-05-02 09:34:00 +02:00
Filip Skokan c17f2688b8 Revert "tools: ensure failed daily wpt run still generates a report"
This reverts commit b17227b6e2.

PR-URL: https://github.com/nodejs/node/pull/47627
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2023-05-02 09:34:00 +02:00
Tetsuharu Ohzeki a54e898dc8 fs: add support for mode flag to specify the copy behavior
`fs.copyFile()` supports copy-on-write operation
if the underlying platform supports it by passing a mode flag.
This behavior was added in
https://github.com/nodejs/node/commit/a16d88d9e9a6581e463082549823189aba25ca76.

This patch adds `mode` flag to `fs.cp()`, `fs.cpSync()`,
and `fsPromises.cp()` to allow to change their behaviors
to copy files.

This test case is based on the test case that was introduced
when we add `fs.constants.COPYFILE_FICLONE`.
https://github.com/nodejs/node/commit/a16d88d9e9a6581e463082549823189aba25ca76.

This test strategy is:

- If the platform supports copy-on-write operation,
  check whether the destination is expected
- Otherwise, the operation will fail
  and check whether the failure error information is expected.

Fixes: https://github.com/nodejs/node/issues/47080
PR-URL: https://github.com/nodejs/node/pull/47084
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-05-02 09:34:00 +02:00
Joyee Cheung cfafe431f2 src: make AliasedBuffers in the binding data weak
The binding data holds references to the AliasedBuffers directly
from their wrappers which already ensures that the AliasedBuffers
won't be accessed when the wrappers are GC'ed. So we can just
make the global references to the AliasedBuffers weak. This way
we can simply deserialize the typed arrays when deserialize the
binding data and avoid the extra Object::Set() calls. It also
eliminates the caveat in the JS land where aliased buffers must
be dynamically read from the binding.

PR-URL: https://github.com/nodejs/node/pull/47354
Refs: https://github.com/nodejs/node/issues/47353
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-05-02 09:33:59 +02:00
Gabriel Schulhof 568256dca0 node-api: test passing NULL to number APIs
PR-URL: https://github.com/nodejs/node/pull/47549
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-05-02 09:33:59 +02:00
Antoine du Hamel fbb6b72f87 esm: remove support for deprecated hooks
Those have been deprecated for a while, it's time.

PR-URL: https://github.com/nodejs/node/pull/47580
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-05-02 09:33:59 +02:00
Mert Can Altın fbe7d73234 tools: add execution permission to uvwasi script
PR-URL: https://github.com/nodejs/node/pull/47600
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-05-02 09:33:59 +02:00
Antoine du Hamel c150976c4f esm: initialize import.meta on eval
PR-URL: https://github.com/nodejs/node/pull/47551
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2023-05-02 09:33:59 +02:00
Node.js GitHub Bot 315454350d deps: update ada to 2.1.0
PR-URL: https://github.com/nodejs/node/pull/47598
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-05-02 09:33:58 +02:00
Tobias Nießen d11ff4bc53 doc: improve fs permissions description
Fix a small grammatical mistake and improve the surrounding wording.

PR-URL: https://github.com/nodejs/node/pull/47596
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2023-05-02 09:33:58 +02:00
Tobias Nießen e3f4ff439e tools: add update script for googletest
GoogleTest follows the Abseil Live at Head philosophy, and rarely
creates tags or GitHub releases, so instead, follow Google's
recommendation and update to the upstream HEAD every once in a while.

The tricky bit is properly updating googletest.gyp, and this script
might fail doing so in the future.

Refs: https://github.com/nodejs/security-wg/issues/828
PR-URL: https://github.com/nodejs/node/pull/47482
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2023-05-02 09:33:58 +02:00
Michaël Zasso 7c552e650a tools: add option to run workflow with specific tool id
PR-URL: https://github.com/nodejs/node/pull/47591
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-05-02 09:33:58 +02:00
Marco Ippolito 1509312170 tools: automate zlib update
PR-URL: https://github.com/nodejs/node/pull/47417
Refs: https://github.com/nodejs/security-wg/issues/828
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2023-05-02 09:33:58 +02:00
Antoine du Hamel 55f70f6395 esm: propagate process.exit from the loader thread to the main thread
PR-URL: https://github.com/nodejs/node/pull/47548
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2023-05-02 09:33:58 +02:00
Chemi Atlow bdd02a467d test_runner: execute before hook on test
Execute the before hook for Test as well, and execute it on root before
executing any tests.

Fixes: https://github.com/nodejs/node/issues/47518
PR-URL: https://github.com/nodejs/node/pull/47586
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-05-02 09:33:57 +02:00
Tobias Nießen b58920c3a9 doc: remove markdown link from heading
This is the only instance of such a link and it is rendered
incorrectly in the TOC.

PR-URL: https://github.com/nodejs/node/pull/47585
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-05-02 09:33:57 +02:00
Antoine du Hamel c36634e880 doc: fix history ordering of WASI constructor
PR-URL: https://github.com/nodejs/node/pull/47611
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2023-05-02 09:33:57 +02:00
Moshe Atlow ec24abaa03 test_runner: avoid reporting parents of failing tests in summary
PR-URL: https://github.com/nodejs/node/pull/47579
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-05-02 09:33:57 +02:00
Chengzhong Wu 12f0fa386d node-api: remove unused mark_arraybuffer_as_untransferable
napi_create_external_arraybuffer creates the arraybuffer with
node::Buffer, which already marks the buffer as untransferable.
The napi_env__::mark_arraybuffer_as_untransferable is not used
anymore.

PR-URL: https://github.com/nodejs/node/pull/47557
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-05-02 09:33:57 +02:00
James M Snell e8ea83416a quic: add more QUIC implementation
* add TLSContext
* quic: add stat collection utilities
* add Packet
* add NgTcp2CallbackScope/NgHttp3CallbackScope

PR-URL: https://github.com/nodejs/node/pull/47494
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-05-02 09:33:56 +02:00
Rafael Gonzaga d3fadd889d doc: fix release-post script location
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/47517
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2023-05-02 09:33:56 +02:00
Tobias Nießen 2a0bbe7883 doc: fix typo in webcrypto metadata
PR-URL: https://github.com/nodejs/node/pull/47595
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-05-02 09:33:56 +02:00
Tobias Nießen 420feb41cf crypto: remove INT_MAX restriction in randomBytes
This restriction was due to an implementation detail in CSPRNG(). Now
that CSPRNG() properly handles lengths exceeding INT_MAX, remove this
artificial restriction.

Refs: https://github.com/nodejs/node/pull/47515
PR-URL: https://github.com/nodejs/node/pull/47559
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2023-05-02 09:33:56 +02:00
Steven R. Loomis 7f7735cad9 deps: update ICU to 73.1 release
- Details: https://icu.unicode.org/download/73

PR-URL: https://github.com/nodejs/node/pull/47456
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2023-05-02 09:33:55 +02:00
Michaël Zasso 13105c12b7 deps: patch V8 to 11.3.244.8
Refs: https://github.com/v8/v8/compare/11.3.244.4...11.3.244.8
PR-URL: https://github.com/nodejs/node/pull/47536
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2023-05-02 09:33:55 +02:00
Mohammed Keyvanzadeh 8712eafc87 typings: fix syntax error in tsconfig
Trailing commas are invalid in JSON files.

PR-URL: https://github.com/nodejs/node/pull/47584
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2023-05-02 09:33:55 +02:00
Tobias Nießen cf48db0034 src: use v8::Boolean(b) over b ? True() : False()
Simplify existing code by using v8::Boolean::New() instead of equivalent
expressions that contain ternary operators.

PR-URL: https://github.com/nodejs/node/pull/47554
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2023-05-02 09:33:55 +02:00
Moritz Raho ba255eda37 src: fix typo in process.env accessor error message
PR-URL: https://github.com/nodejs/node/pull/47014
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-05-02 09:33:54 +02:00
Moshe Atlow 4203057740 test_runner: fix spec skip detection
PR-URL: https://github.com/nodejs/node/pull/47537
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2023-05-02 09:33:54 +02:00
Daniel Lemire daf0c78232 src: replace static const string_view by static constexpr
PR-URL: https://github.com/nodejs/node/pull/47524
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-05-02 09:33:54 +02:00
Tobias Nießen 57e7ed7f47 src: fix CSPRNG when length exceeds INT_MAX
CSPRNG implicitly casts the size_t length argument to a signed int when
calling RAND_bytes(), which leaves it up to the caller to ensure that
the length argument actually fits into such a signed int. However, not
all call sites explicitly ensure that, which could lead to subtle bugs.

In OpenSSL 3, use RAND_bytes_ex() instead, which does not require
casting the length to a signed int.

In OpenSSL 1.1.1, RAND_bytes_ex() is not supported, thus we have to
process blocks of size INT_MAX one by one.

PR-URL: https://github.com/nodejs/node/pull/47515
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-05-02 09:33:54 +02:00
dependabot[bot] 35e8b3b467 build: bump ossf/scorecard-action from 2.1.2 to 2.1.3
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/e38b1902ae4f44df626f11ba0734b14fb91f8f86...80e868c13c90f172d68d1f4501dee99e2479f7af)

PR-URL: https://github.com/nodejs/node/pull/47367
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-05-02 09:33:54 +02:00
Yagiz Nizipli 6af7f1ee03 tools: add url and whatwg-url labels automatically
PR-URL: https://github.com/nodejs/node/pull/47545
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
2023-05-02 09:33:53 +02:00