- Jun 03, 2020
-
-
Shelley Vohr authored
PR-URL: https://github.com/nodejs/node/pull/33362 Reviewed-By:
Steven R Loomis <srloomis@us.ibm.com>
-
Joyee Cheung authored
- Add clarifications for Node.js-only extensions - Explain the Web Performance APIs implemented in Node.js and clarify that perf_hooks also include other non-Web APIs. - Prefix exposed interfaces with `perf_hooks.` to distinguish them from internal classes. PR-URL: https://github.com/nodejs/node/pull/33199 Refs: https://github.com/nodejs/node/issues/28635 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Chengzhong Wu <legendecas@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Andrew Paprocki authored
Updates the "Maintaining ICU" document and describes the process to update an existing ICU `.dat` file with updated binary time zone data files corresponding to new IANA `tzdata` releases. Requested in nodejs/node#30211 by @srl295 PR-URL: https://github.com/nodejs/node/pull/30364 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
David Carlier <devnexen@gmail.com> Reviewed-By:
Steven R Loomis <srloomis@us.ibm.com>
-
Robert Nagy authored
Duplex did not properly forward writableObjectMode. Fixes: https://github.com/nodejs/node/issues/33388 PR-URL: https://github.com/nodejs/node/pull/33390 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Daniel Bevenius authored
PR-URL: https://github.com/nodejs/node/pull/33417 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Daniel Bevenius authored
This commit removes the unused 'misc' variable from one of the NodeMainInstance constructors. Another option could be to add a default argument to SetIsolateMiscHandlers but I'd like to hear what others think about that first. PR-URL: https://github.com/nodejs/node/pull/33417 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Daniel Bevenius authored
This commit adds promise_resolve to the list of callbacks mentioned in the comment. It also fixes a minor typo, every -> ever. PR-URL: https://github.com/nodejs/node/pull/33365 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Thomas authored
Some consoles do not convert ANSI escape sequences to colors, rather display them directly to the stdout. On those consoles, libuv emulates colors by intercepting stdout stream and calling corresponding Windows API functions for setting console colors. However, fatal error are handled differently and we cannot easily highlight them. PR-URL: https://github.com/nodejs/node/pull/33132 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
Michaël Zasso authored
PR-URL: https://github.com/nodejs-private/node-private/pull/212
-
- Jun 02, 2020
-
-
Michaël Zasso authored
This is a security release. Notable changes: Vulnerabilities fixed: CVE-2020-8172: TLS session reuse can lead to host certificate verification bypass (High). CVE-2020-11080: HTTP/2 Large Settings Frame DoS (Low). CVE-2020-8174: `napi_get_value_string_*()` allows various kinds of memory corruption (High). PR-URL: https://github.com/nodejs-private/node-private/pull/212
-
Fedor Indutny authored
Prior to this patch `session` event was emitted after `secure` event on TLSSocket, but before `secureConnect` event. This is problematic for `https.Agent` because it must cache session only after verifying the remote peer's certificate. Connecting to a server that presents an invalid certificate resulted in the session being cached after the handshake with the server and evicted right after a certifiate validation error and socket's destruction. A request initiated during this narrow window would pick the faulty session, send it to the malicious server and skip the verification of the server's certificate. Fixes: https://hackerone.com/reports/811502 CVE-ID: CVE-2020-8172 PR-URL: https://github.com/nodejs-private/node-private/pull/200 Reviewed-By:
Sam Roberts <vieuxtech@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
James M Snell authored
Adds the maxSettings option to limit the number of settings entries allowed per SETTINGS frame. Default 32 Fixes: https://hackerone.com/reports/446662 CVE-ID: CVE-2020-11080 PR-URL: https://github.com/nodejs-private/node-private/pull/204 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
James M Snell authored
Fixes: https://hackerone.com/reports/446662 CVE-ID: CVE-2020-11080 PR-URL: https://github.com/nodejs-private/node-private/pull/204 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
Tobias Nießen authored
Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
AshCripps authored
Update the list of root certificates in src/node_root_certs.h with tools/mk-ca-bundle.pl. Certificates added: Entrust Root Certification Authority - G4 Certificates removed: PR-URL: https://github.com/nodejs/node/pull/33682 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Sam Roberts <vieuxtech@gmail.com> Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By:
Juan José Arboleda <soyjuanarbol@gmail.com>
-
AshCripps authored
This is the certdata.txt[0] from NSS 3.53, released on 2020-05-29. This is the version of NSS that will ship in Firefox 78 on 2020-06-30. [0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_53_RTM/lib/ckfw/builtins/certdata.txt PR-URL: https://github.com/nodejs/node/pull/33682 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Sam Roberts <vieuxtech@gmail.com> Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By:
Juan José Arboleda <soyjuanarbol@gmail.com>
-
- May 20, 2020
-
-
Shelley Vohr authored
PR-URL: https://github.com/nodejs/node/pull/33452
-
Shelley Vohr authored
Notable changes: async_hooks: * (SEMVER-MINOR) move PromiseHook handler to JS (Stephen Belanger) https://github.com/nodejs/node/pull/32891 cli: * (SEMVER-MINOR) add `--trace-atomics-wait` flag (Anna Henningsen) https://github.com/nodejs/node/pull/33292 fs: * (SEMVER-MINOR) add .ref() and .unref() methods to watcher classes (rickyes) https://github.com/nodejs/node/pull/33134 http: * (SEMVER-MINOR) expose http.validate-header-name/value (osher) https://github.com/nodejs/node/pull/33119 repl: * (SEMVER-MINOR) deprecate repl._builtinLibs (Ruben Bridgewater) https://github.com/nodejs/node/pull/33294 * (SEMVER-MINOR) deprecate repl.inputStream and repl.outputStream (Ruben Bridgewater) https://github.com/nodejs/node/pull/33294 * (SEMVER-MINOR) show reference errors during preview (Ruben Bridgewater) https://github.com/nodejs/node/pull/33282 * (SEMVER-MINOR) improve repl preview (Ruben Bridgewater) https://github.com/nodejs/node/pull/33282 src: * add support for TLA (Gus Caplan) https://github.com/nodejs/node/pull/30370 PR-URL: TODO
-
- May 19, 2020
-
-
Anna Henningsen authored
This fails compilation on at least one platform because there is no `default:` case, despite all currently possible enum values being listed. Fix that by adding a default message that won’t be used unless V8 introduces new enum values. Refs: https://github.com/nodejs/node/commit/c7eeef568ce5a3714b89689160ec85c017527364#commitcomment-39228519 PR-URL: https://github.com/nodejs/node/pull/33451 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com>
-
- May 18, 2020
-
-
Rich Trott authored
PR-URL: https://github.com/nodejs/node/pull/33412 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Richard Lau <riclau@uk.ibm.com>
-
Rich Trott authored
Add a comment to disable a rule in the 14.x changelog that will be needed once we update remark lint dependencies. This comment appears in the other changelogs. Refs: https://github.com/nodejs/remark-preset-lint-node/pull/89#issuecomment-628978791 PR-URL: https://github.com/nodejs/node/pull/33412 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Richard Lau <riclau@uk.ibm.com>
-
Gus Caplan authored
PR-URL: https://github.com/nodejs/node/pull/33408 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Myles Borins <myles.borins@gmail.com>
-
- May 17, 2020
-
-
Anna Henningsen authored
Release `Buffer` and `ArrayBuffer` instances that were created through our addon APIs and have finalizers attached to them only after V8 has called the deleter callback passed to the `BackingStore`, instead of relying on our own GC callback(s). This fixes the following race condition: 1. Addon code allocates pointer P via `malloc`. 2. P is passed into `napi_create_external_buffer` with a finalization callback which calls `free(P)`. P is inserted into V8’s global array buffer table for tracking. 3. The finalization callback is executed on GC. P is freed and returned to the allocator. P is not yet removed from V8’s global array buffer table. (!) 4. Addon code attempts to allocate memory once again. The allocator returns P, as it is now available. 5. P is passed into `napi_create_external_buffer`. P still has not been removed from the v8 global array buffer table. 6. The world ends with `Check failed: result.second`. Since our API contract is to call the finalizer on the JS thread on which the `ArrayBuffer` was created, but V8 may call the `BackingStore` deleter callback on another thread, fixing this requires posting a task back to the JS thread. Refs: https://github.com/nodejs/node/issues/32463#issuecomment-625877175 Fixes: https://github.com/nodejs/node/issues/32463 PR-URL: https://github.com/nodejs/node/pull/33321 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
In some situations, it can be useful to use threadsafe callbacks on an `Environment` to perform cleanup operations that should run even when the process would otherwise be ending. PR-URL: https://github.com/nodejs/node/pull/33320 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
To be more precise, fix a crash when `worker.unref()` is called from a message on the Worker that is not emitted before the Worker thread has stopped. PR-URL: https://github.com/nodejs/node/pull/33394 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Cheng Zhao authored
When precompile headers are disabled this file would cause compilation errors due to #include <string> not included. PR-URL: https://github.com/nodejs/node/pull/33332 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ruben Bridgewater authored
This is a manually edited and outdated list of builtin modules. Instead, it is better to rely upon the officially documented way to get a list of builtin modules. As a side by fix this makes sure all exports are in one place. Thus, it is easier to see what parts are actually exported and which are not. Signed-off-by:
Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/33294 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ruben Bridgewater authored
It is also assigned in readline. There is not need to assign the variable twice. Signed-off-by:
Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/33294 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ruben Bridgewater authored
The stream is exposed twice. As such it's best to rely upon the .input and .output properties set by readline. Signed-off-by:
Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/33294 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Luigi Pinca authored
Refs: https://github.com/nodejs/node/pull/32644 Refs: https://github.com/nodejs/node/pull/32662 PR-URL: https://github.com/nodejs/node/pull/32667 Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
Antoine du Hamel authored
Adds hint when module specifier is a file URL. PR-URL: https://github.com/nodejs/node/pull/33220 Fixes: https://github.com/nodejs/node/issues/33219 Reviewed-By:
Guy Bedford <guybedford@gmail.com>
-
Antoine du HAMEL authored
PR-URL: https://github.com/nodejs/node/pull/33220 Fixes: https://github.com/nodejs/node/issues/33219 Reviewed-By:
Guy Bedford <guybedford@gmail.com>
-
Anna Henningsen authored
- Un-break the code for multibyte characters - Get `fs.createReadStream` from the right module PR-URL: https://github.com/nodejs/node/pull/33426 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
himself65 authored
PR-URL: https://github.com/nodejs/node/pull/33383 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Masashi Hirano <shisama07@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Juan José Arboleda <soyjuanarbol@gmail.com>
-
Anna Henningsen authored
Add regression tests for the case in which an async_hook is enabled inside a Worker thread and `process.exit()` is called during the async part of an async function. This commit includes multiple tests that seem like they should all crash in a similar way, but interestingly don’t. In particular, it’s surprising that the presence of a statement after `process.exit()` in a function has an effect on the kind of crash that’s being exhibited (V8 DCHECK vs. assertion in our own code) and the circumstances under which it crashes (e.g. the -1 and -2 tests can be “fixed” by reverting 13c5a162, although they should have the same behavior as the -3 and -4 tests). PR-URL: https://github.com/nodejs/node/pull/33347 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Anna Henningsen authored
Termination exceptions are similar to uncaught exceptions in that they should clear the async id stack, because no ongoing async callbacks will be brought to completion when execution terminates. Previously, there was a check that made sure that that happened when the termination occurred during the callback itself, but no such check was in place for the case that the termination occurred during microtasks started by them. This commit adds such a check, both for microtasks and the `nextTick` queue. The latter addition doesn’t fix a crash, but still makes sense conceptually. The condition here is also flipped from applying only on Worker threads to also applying on the main thread, and setting the `failed_` flag rather than reading it. The former makes sense because the public C++ `Stop(env)` API can have the same effect as worker thread termination, but on the main thread rather than a Worker thread. PR-URL: https://github.com/nodejs/node/pull/33347 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Anna Henningsen authored
As the comment indicates, this fixes a DCHECK failure, although I don’t quite understand why it is happening in the first place. PR-URL: https://github.com/nodejs/node/pull/33347 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
David Carlier <devnexen@gmail.com>
-
Anna Henningsen authored
Adds a flag that helps with debugging deadlocks due to incorrectly implemented `Atomics.wait()` calls. PR-URL: https://github.com/nodejs/node/pull/33292 Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
David Carlier <devnexen@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com>
-
Anna Henningsen authored
libuv does not expect concurrent operations on `uv_dir_t` instances, and will gladly create memory leaks, corrupt data, or crash the process. This patch forbids that, and: - Makes sure that concurrent async operations are run sequentially - Throws an exception if sync operations are attempted during an async operation The assumption here is that a thrown exception is preferable to a potential hard crash. This fully fixes flakiness from `parallel/test-fs-opendir` when run under ASAN. PR-URL: https://github.com/nodejs/node/pull/33274 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Anna Henningsen authored
A call into JS can schedule another operation on the same `uv_dir_t`. In particular, when the handle is closed from the callback for a directory read operation, there previously was a race condition window: 1. A `dir.read()` operation is submitted to libuv 2. The read operation is finished by libuv, calling `AfterDirRead()` 3. We call into JS 4. JS calls dir.close() 5. libuv posts the close request to a thread in the pool 6. The close request runs, destroying the directory handle 7. `AfterDirRead()` is being exited. Exiting the `FSReqAfterScope` in step 7 attempts to destroy the original uv_fs_t` from step 1, which now points to an `uv_dir_t` that has already been destroyed in step 5. By forcing the `FSReqAfterScope` to clean up before we call into JS, we can be sure that no other operations on the same `uv_dir_t` are submitted concurrently. This addresses issues observed when running with ASAN/valgrind. PR-URL: https://github.com/nodejs/node/pull/33274 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-