Ruy Adorno
aa0e4eb27f
deps: upgrade npm to 7.14.0
...
PR-URL: https://github.com/nodejs/node/pull/38750
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-05-21 10:58:00 -04:00
legendecas
50f076c4f5
src: write named pipe info in diagnostic report
...
Writes pipe handles with `uv_pipe_getsockname()`
and `uv_pipe_getpeername()`.
PR-URL: https://github.com/nodejs/node/pull/38637
Fixes: https://github.com/nodejs/node/issues/38625
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2021-05-21 11:41:33 +08:00
Juan José Arboleda
d7611ec6e6
src: remove unused iostream library
...
Remove unused `iostream` library in `node_main_instance.cc` and
`aliased_buffer.h` files
PR-URL: https://github.com/nodejs/node/pull/38694
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2021-05-20 17:03:44 -05:00
Fedor Indutny
d798de1c65
deps: update llhttp to 6.0.2
...
Fix : #37053
See: https://github.com/nodejs/llparse/pull/44
PR-URL: https://github.com/nodejs/node/pull/38665
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daniele Belardi <dwon.dnl@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-05-20 12:32:21 -07:00
Shelley Vohr
2cc60fc647
src: remove more extra semis from member fns
...
PR-URL: https://github.com/nodejs/node/pull/38744
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-05-20 11:19:32 -07:00
Guy Bedford
01940ee285
doc: document null target pattern
...
PR-URL: https://github.com/nodejs/node/pull/38724
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-05-20 18:53:45 +02:00
Qingyu Deng
b9ef539eae
stream: allow empty string as source of pipeline
...
Fixes: https://github.com/nodejs/node/issues/38721
PR-URL: https://github.com/nodejs/node/pull/38723
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-05-20 09:46:47 -07:00
Michael Dawson
c32c5f0d43
node-api: fix shutdown crashes
...
Refs: https://github.com/nodejs/node-addon-api/issues/906
Ensure that finalization is not defered during shutdown.
The env for the addon is deleted immediately after
iterating the list of finalizers to be run. Defering
causes crashes as the finalization uses the already
deleted env.
Signed-off-by: Michael Dawson <mdawson@devrus.com >
PR-URL: https://github.com/nodejs/node/pull/38492
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Gabriel Schulhof <gabrielschulhof@gmail.com >
2021-05-20 10:17:45 -04:00
Gabriel Schulhof
3f025cb5d0
test: give js-native-api tests consistent names
...
The convention for js-native-api/<test_name>:
* <test_name>.c or <test_name>.cc has the entry point
* The name of the target is <test_name>
PR-URL: https://github.com/nodejs/node/pull/38692
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-05-19 16:43:19 -04:00
XadillaX
a742c40631
src: replace autos in node_contextify.cc
...
PR-URL: https://github.com/nodejs/node/pull/38644
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2021-05-19 16:39:07 -04:00
fisker Cheung
42cceff1f7
doc: update code examples for node:url module
...
There are many things called `url` in this page including `url` module,
`URL` instances, etc.
The original example was not clear where these methods come from.
PR-URL: https://github.com/nodejs/node/pull/38645
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-05-19 19:18:06 +02:00
Joyee Cheung
527da94a3e
bootstrap: include vm and contextify binding into the snapshot
...
In addition, defer the patching of the vm module based on the
value of --experimental-vm-modules to runtime.
PR-URL: https://github.com/nodejs/node/pull/38677
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2021-05-20 01:16:00 +08:00
Rongjian Zhang
5d7b6c2497
lib: refactor to reuse validators
...
PR-URL: https://github.com/nodejs/node/pull/38608
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-05-19 09:22:56 -07:00
Antoine du Hamel
2eeb4e1d94
lib: make primordials Promise methods safe
...
`catch` and `finally` methods on %Promise.prototype% looks up the `then`
property of the instance, making it at risk of prototype pollution.
PR-URL: https://github.com/nodejs/node/pull/38650
Refs: https://tc39.es/ecma262/#sec-promise.prototype.catch
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-05-19 09:21:37 -07:00
Rongjian Zhang
fc6e7e93e8
test: improve coverage of stream.Readable
...
PR-URL: https://github.com/nodejs/node/pull/38702
Refs: https://coverage.nodejs.org/coverage-0996eb71edbd47d9/lib/internal/streams/readable.js.html#L401
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-05-19 09:20:33 -07:00
Michaël Zasso
44ffddae8b
2021-05-19, Version 16.2.0 (Current)
...
Notable changes:
async_hooks:
* (SEMVER-MINOR) use new v8::Context PromiseHook API (Stephen Belanger) https://github.com/nodejs/node/pull/36394
lib:
* support setting process.env.TZ on windows (James M Snell) https://github.com/nodejs/node/pull/38642
module:
* (SEMVER-MINOR) add support for `URL` to `import.meta.resolve` (Antoine du Hamel) https://github.com/nodejs/node/pull/38587
process:
* (SEMVER-MINOR) add `'worker'` event (James M Snell) https://github.com/nodejs/node/pull/38659
util:
* (SEMVER-MINOR) add util.types.isKeyObject and util.types.isCryptoKey (Filip Skokan) https://github.com/nodejs/node/pull/38619
PR-URL: https://github.com/nodejs/node/pull/38719
2021-05-19 12:56:18 +02:00
Jiawen Geng
910efc2d9a
tools: remove redundant v8 config
...
PR-URL: https://github.com/nodejs/node/pull/38565
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-05-18 03:12:21 +00:00
legendecas
f536cc2e89
src: fix fatal errors when a current isolate not exist
...
napi_fatal_error and node watchdog trigger fatal error but rather
running on a thread that hold no current isolate.
PR-URL: https://github.com/nodejs/node/pull/38624
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-05-18 09:44:59 +08:00
Tobias Nießen
3b1a9936a8
doc: document buffer.kStringMaxLength
...
PR-URL: https://github.com/nodejs/node/pull/38688
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Harshitha K P <harshitha014@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-05-17 12:33:10 -07:00
Juan José Arboleda
354b0bef02
test: refactor test-readline-interface to be shorter
...
PR-URL: https://github.com/nodejs/node/pull/38691
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-05-17 12:29:44 -07:00
Nitzan Uziely
cbe0f0959e
test: stream.finished detects a destroyed IncomingMessage
...
Add a test to verify that stream.finished works correctly
on IncomingMessage
refs: https://github.com/nodejs/node/issues/38657
PR-URL: https://github.com/nodejs/node/pull/38661
Refs: https://github.com/nodejs/node/issues/38657
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-05-17 12:28:01 -07:00
Voltrex
6e6663b8a4
events: use nullish coalencing operator
...
PR-URL: https://github.com/nodejs/node/pull/38328
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-05-17 12:26:29 -07:00
Moritz Kneilmann
ceae1b47b7
doc: update abort signal in fs promise api example
...
PR-URL: https://github.com/nodejs/node/pull/38669
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-05-17 12:24:27 -07:00
Andreas Schwab
9d85710899
test: set common.bits to 64 for riscv64
...
PR-URL: https://github.com/nodejs/node/pull/38626
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-05-17 12:21:41 -07:00
Hitesh Sharma
5b9074813f
doc: add documentation for fs.WriteStream.close()
...
PR-URL: https://github.com/nodejs/node/pull/38610
Fixes: https://github.com/nodejs/node/issues/38606
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-05-17 12:20:08 -07:00
moander
417c31b69a
errors: remove input from ERR_INVALID_URL message
...
Avoid potentially huge messages and leaked secrets.
PR-URL: https://github.com/nodejs/node/pull/38614
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-05-17 12:17:24 -07:00
Nitzan Uziely
3612229d44
fs: fix async iterator partial writes
...
fix an issue where chunks might be partially written when
using writeFile with an async iterator.
PR-URL: https://github.com/nodejs/node/pull/38615
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-05-17 12:16:27 -07:00
James M Snell
61a67c1625
doc: clarify synchronous blocking of Worker stdio
...
Fixes: https://github.com/nodejs/node/issues/25630
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/38658
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-05-17 12:06:18 -07:00
James M Snell
16cb4f720b
lib: support setting process.env.TZ on windows
...
Fixes: https://github.com/nodejs/node/issues/4230
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/38642
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-05-17 12:02:49 -07:00
Anna Henningsen
75340f3c52
src: update cares_wrap OpenBSD defines
...
Move the `#define`s back into `cares_wrap.cc`, as they are part of
the implementation, not the declarations used in `cares_wrap.h`,
and apply the suggestion from
https://github.com/nodejs/node/pull/38572#discussion_r627809407
to make the defines a bit more generic and not check for OpenBSD
specifically.
Refs: https://github.com/nodejs/node/pull/38572
PR-URL: https://github.com/nodejs/node/pull/38670
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-05-17 18:02:33 +02:00
Filip Skokan
3ee1f9a29a
util: add util.types.isKeyObject and util.types.isCryptoKey
...
closes #38611
PR-URL: https://github.com/nodejs/node/pull/38619
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2021-05-17 10:29:18 +02:00
Filip Skokan
2130598e91
crypto: forbid NODE-ED25519 and NODE-ED448 "raw" key export
...
closes #38655
PR-URL: https://github.com/nodejs/node/pull/38668
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-05-17 10:28:37 +02:00
cjihrig
36bb31be5f
tools: update ESLint to 7.26.0
...
Update ESLint to 7.26.0
PR-URL: https://github.com/nodejs/node/pull/38605
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-05-16 10:16:13 -04:00
Shelley Vohr
82eddca23d
src: remove extra semi after member fn
...
PR-URL: https://github.com/nodejs/node/pull/38686
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-05-16 14:42:27 +02:00
Antoine du Hamel
0996eb71ed
repl: fix Ctrl+C on top level await
...
PR-URL: https://github.com/nodejs/node/pull/38656
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2021-05-15 21:47:55 +02:00
Ruy Adorno
4a22850d7f
deps: upgrade npm to 7.13.0
...
PR-URL: https://github.com/nodejs/node/pull/38682
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2021-05-14 22:16:38 -07:00
Gabriel Schulhof
d7bf2e0040
doc: update contact info
...
Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/38689
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2021-05-14 20:03:28 -07:00
Qingyu Deng
67ecd05d7a
doc: change color of doctag on night mode
...
Fixes: https://github.com/nodejs/node/issues/38641
PR-URL: https://github.com/nodejs/node/pull/38652
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-05-14 16:04:22 -07:00
Antoine du Hamel
df744dbb95
doc: add ESM code examples in url.md
...
PR-URL: https://github.com/nodejs/node/pull/38651
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Masashi Hirano <shisama07@gmail.com >
2021-05-14 15:57:46 -07:00
Rongjian Zhang
0ca6d21dfc
test: improve coverage of lib/_http_client.js
...
PR-URL: https://github.com/nodejs/node/pull/38599
Refs: https://coverage.nodejs.org/coverage-f37c26b8a2e10d0a/lib/_http_client.js.html#L200
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2021-05-14 15:55:09 -07:00
Antoine du Hamel
284f74d6f9
debugger: refactor inspect_repl to use primordials
...
PR-URL: https://github.com/nodejs/node/pull/38551
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2021-05-14 15:53:34 -07:00
Daniel Bevenius
0d7644fdda
build,src,test,doc: enable FIPS for OpenSSL 3.0
...
This commit enables FIPS when Node.js is dynamically linking against
quictls/openssl-3.0.
BUILDING.md has been updated with instructions to configure and build
quictls/openssl 3.0.0-alpha-15 and includes a couple of work-arounds
which I believe are fixed in alpha-16 and can be removed when alpha-16
is available. The information might be a little too detailed/verbose
but I thought it would be helpful to at least initially include all the
steps.
PR-URL: https://github.com/nodejs/node/pull/38633
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-05-14 16:15:19 -04:00
Rongjian Zhang
35b445d089
test: improve coverage of lib/os.js
...
PR-URL: https://github.com/nodejs/node/pull/38653
Refs: https://coverage.nodejs.org/coverage-52e4fb5b23157222/lib/os.js.html#L96
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2021-05-14 16:07:15 -04:00
Rongjian Zhang
a03d3afa69
http: refactor to remove redundant argument of _deferToConnect
...
PR-URL: https://github.com/nodejs/node/pull/38598
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-05-14 14:43:33 +02:00
Timothy Gu
70157b9cb7
url: forbid certain confusable changes from being introduced by toASCII
...
The legacy url.parse() function attempts to convert Unicode domains
(IDNs) into their ASCII/Punycode form through the use of the toASCII
function. However, toASCII can introduce or remove various characters
that at best invalidate the parsed URL, and at worst cause hostname
spoofing:
url.parse('http://bad.c℀.good.com/ ').href === 'http://bad.ca/c.good.com/ '
(from [1])
url.parse('http://\u00AD/bad.com ').href === 'http:///bad.com/ '
While changes to the legacy URL parser are discouraged in general, the
security implications here outweigh the desire for strict compatibility.
This is since this commit only changes behavior when non-ASCII
characters appear in the hostname, an unusual situation for most use
cases. Additionally, despite the availability of the WHATWG URL API,
url.parse remain widely deployed in the Node.js ecosystem, as
exemplified by the recent un-deprecation of the legacy API.
This change is similar in spirit to CPython 3.8's change [2] fixing
bpo-36216 [3] aka CVE-2019-9636, which also occurred despite potential
compatibility concerns.
[1]: https://hackerone.com/reports/678487
[2]: https://github.com/python/cpython/commit/16e6f7dee7f02bb81aa6b385b982dcdda5b99286
[3]: https://bugs.python.org/issue36216
PR-URL: https://github.com/nodejs/node/pull/38631
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2021-05-13 23:04:23 -07:00
James M Snell
41fab0d6cb
tools: add Worker to type-parser
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/38659
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2021-05-13 18:12:53 -07:00
James M Snell
2c80048cb7
process: add 'worker' event
...
Provides a new `process.on('worker', (worker) => {})` event that
is triggered by the creation of a new `worker_thread.Worker`.
The use case is to allow hooks to be installed for monitoring
workers without having to modify the call sites around those.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/38659
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2021-05-13 18:12:52 -07:00
Ruy Adorno
aefc621e67
deps: upgrade npm to 7.12.1
...
PR-URL: https://github.com/nodejs/node/pull/38628
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
2021-05-12 14:20:21 -04:00
Voltrex
89f592cc82
path: inline conditions
...
This condition can be inlined in the first `if` statement since
if the `path`'s length is 0, it'll be a empty string so we can
return that as there's no need for an extra `if` statement.
PR-URL: https://github.com/nodejs/node/pull/38613
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-05-12 07:26:22 -07:00
Richard Lau
d206aa36e2
build: add workaround for V8 builds
...
V8's build toolchain is not compatible with Python 3 and the CI job
that tests V8 needs to be run with Python 2. Add a fallback to
`find_executable` from `distutils.spawn` to allow the configure
script to run in the V8 test job.
PR-URL: https://github.com/nodejs/node/pull/38632
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2021-05-12 05:42:25 -04:00