- Feb 07, 2019
-
-
Sam Roberts authored
PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Sam Roberts authored
Connection is known to be completely setup only after data has exchanged, so wait unil data echo before sending a bad record. Otherwise, the bad record could interrupt completion of the server's handshake, and whether the error is emitted on the connection or server is a matter of timing. Also, assert that server errors do not occur. 'error' would crash node with and unhandled event, but 'tlsClientError' is ignored by default. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Sam Roberts authored
The timing of destroy between client/server is undefined, but end is guaranteed to occur. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Sam Roberts authored
This test has a dependency on the order in which the TCP connection is made, and TLS server handshake completes. It assumes those server side events occur before the client side write callback, which is not guaranteed by the TLS API. It usually passes with TLS1.3, but TLS1.3 didn't exist at the time the bug existed. Pin the test to TLS1.2, since the test shouldn't be changed in a way that doesn't trigger a segfault in 7.7.3: - https://github.com/nodejs/node/issues/13184#issuecomment-303700377 PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Sam Roberts authored
Existing code assumed that the server completed the handshake before the client rejected the certificate, and destroyed the socket. This assumption is fragile, remove it, and instead check explicitly that data can or cannot be exchanged via TLS, whichever is expected. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Sam Roberts authored
Do not assume that server handshake event happens before client, it is not guaranteed. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Sam Roberts authored
Test assumed that server got the the connection before the client destroys it, but that is not guaranteed. Also, the test was closing the TCP connection 3 times, effectively: 1. on the server side, right after TLS connection occurs (if it does) 2. on the client side, internal to tls, when the cert is rejected 3. again on the client side, in the error event which is emitted by the internal tls destroy from 2 This is too often, and the dependency on 1 occurring is fragile. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Sam Roberts authored
Test assumed server gets a handshake before the client destroyed it, and didn't assert that dns.lookup() callback occurred. PR-URL: https://github.com/nodejs/node/pull/25508 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Rich Trott authored
Test for deep strict equality when prototype and toStringTag have been modified in surprising ways. PR-URL: https://github.com/nodejs/node/pull/25932 Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Rich Trott authored
Add some BigInt tests for test-util-isDeepStrictEqual to get 100% coverage for lib/internal/util/comparisons.js. PR-URL: https://github.com/nodejs/node/pull/25932 Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
sreepurnajasti authored
Fixes: https://github.com/nodejs/node/issues/25750 PR-URL: https://github.com/nodejs/node/pull/25770 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Joyee Cheung authored
Previously a GC prologue callback and a GC epilogue callback are always unconditionally enabled during bootstrap when the `performance` binding is loaded, even when the user does not use the performance timeline API to enable GC tracking. This patch makes the callback addition conditional and only enables them when the user explicitly requests `observer.observe(['gc'])` to avoid the overhead. PR-URL: https://github.com/nodejs/node/pull/25853 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Luigi Pinca authored
`Socket.prototype.setTimeout()` clears the previous timer before setting a new one. Refs: https://github.com/nodejs/node/pull/25748#discussion_r253393234 PR-URL: https://github.com/nodejs/node/pull/25928 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Sam Roberts authored
Allow undefined as a callback, but do not allow null. PR-URL: https://github.com/nodejs/node/pull/25929 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anatoli Papirovski <apapirovski@mac.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Minwoo Jung <minwoo@nodesource.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Rich Trott authored
Remove setting of a 'close' event handler on MessagePort through the use of an `.onclose` property. We don't use this convention anywhere else in our codebase for 'close' events, this feature is undocumented, and we don't test it. PR-URL: https://github.com/nodejs/node/pull/25904 Reviewed-By:
Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By:
Yuta Hiroto <hello@hiroppy.me> Reviewed-By:
Ujjwal Sharma <usharma1998@gmail.com>
-
Robin Neatherway authored
* Confusing (but correct) regex using `A-z` character range by accident * Add the status argument to afterShutdown PR-URL: https://github.com/nodejs/node/pull/25873 Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Sam Roberts <vieuxtech@gmail.com>
-
- Feb 06, 2019
-
-
Anna Henningsen authored
PR-URL: https://github.com/nodejs/node/pull/25906 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Gireesh Punathil authored
when t0 and t1 are spawned with t0's outputstream [1, 2] is piped into t1's input, a new pipe is created which uses a copy of the t0's fd. This leaves the original copy in Node parent, unattended. Net result is that when t0 produces data, it gets bifurcated into both the copies Detect the passed handle to be of 'wrap' type and close after the native spawn invocation by which time piping would have been over. Fixes: https://github.com/nodejs/node/issues/9413 Fixes: https://github.com/nodejs/node/issues/18016 PR-URL: https://github.com/nodejs/node/pull/21209 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Ruben Bridgewater authored
The removed line does not add anything of value to the test. It was removed to simplify the test. PR-URL: https://github.com/nodejs/node/pull/25731 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Ruben Bridgewater authored
It is checked if an command buffer exists or not. This code branch can only be reached if none exist, so there's no need to clear that buffer again. PR-URL: https://github.com/nodejs/node/pull/25731 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Ruben Bridgewater authored
In case no error has occurred during the evaluation of some code, `undefined` has been returned in some cases as error argument instead of `null`. This is fixed by this patch. PR-URL: https://github.com/nodejs/node/pull/25731 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
Ruben Bridgewater authored
The completion lists used a hand crafted list of global entries that was redundant due to also using the actual global properties for tab completion. Those entries ended up in an separated completion group which did not seem useful. PR-URL: https://github.com/nodejs/node/pull/25731 Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl>
-
João Reis authored
PR-URL: https://github.com/nodejs/node/pull/25838 Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By:
Michaël Zasso <targos@protonmail.com> Reviewed-By:
Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com>
-
XadillaX authored
c-ares rejects *.onion MX query but forgot to set `*bufp` to NULL. This will occur SegmentFault when free `*bufp`. I make this quick fix and then will make a PR for c-ares either. PR-URL: https://github.com/nodejs/node/pull/25840 Fixes: https://github.com/nodejs/node/issues/25839 Refs: https://github.com/c-ares/c-ares/blob/955df98/ares_create_query.c#L97-L103 Refs: https://github.com/c-ares/c-ares/blob/955df98/ares_query.c#L124 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
gengjiawen authored
Signed-off-by:
gengjiawen <technicalcute@gmail.com> PR-URL: https://github.com/nodejs/node/pull/25849 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
gengjiawen authored
Signed-off-by:
gengjiawen <technicalcute@gmail.com> PR-URL: https://github.com/nodejs/node/pull/25850 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Joyee Cheung authored
Because the part that is shared by `process.reallyExit` and the Node.js teardown is `WaitForInspectorDisconnect()`, move that into node_internals.h instead, and move the C++ binding code into `node_process_methods.cc` since that's the only place it's needed. PR-URL: https://github.com/nodejs/node/pull/25860 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Minwoo Jung <minwoo@nodesource.com> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com>
-
gengjiawen authored
Signed-off-by:
gengjiawen <technicalcute@gmail.com> PR-URL: https://github.com/nodejs/node/pull/25889 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
cjihrig authored
Some process methods are not supported in workers. This commit adds stubs that throw more informative errors. PR-URL: https://github.com/nodejs/node/pull/25587 Fixes: https://github.com/nodejs/node/issues/25448 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Sam Roberts authored
PR-URL: https://github.com/nodejs/node/pull/25861 Reviewed-By:
Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Sam Roberts authored
The const_cast used to be necessary for SSL_get_app_data() in OpenSSL 0.9.7, but node doesn't compile against OpenSSL versions that old. However, now it's needed for the recently introduced SSL_renegotiate_pending(), which is not const-correct as of 1.1.1a. PR-URL: https://github.com/nodejs/node/pull/25861 Reviewed-By:
Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Sam Roberts authored
- Don't use both break and return simultaneously. - Use case:/UNREACHABLE() to enforce that all cases are handled, instead of CHECK(). PR-URL: https://github.com/nodejs/node/pull/25861 Reviewed-By:
Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Sam Roberts authored
`tls` shadows the global `tls` require, and isn't indicative of the arument type. PR-URL: https://github.com/nodejs/node/pull/25861 Reviewed-By:
Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Sam Roberts authored
Make it clear which of the multiple interfaces a TLSWrap method is implementing by grouping and commenting the related methods. PR-URL: https://github.com/nodejs/node/pull/25861 Reviewed-By:
Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Sam Roberts authored
Declaration is unused, it was added by mistake in 46c5c338. PR-URL: https://github.com/nodejs/node/pull/25861 Reviewed-By:
Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net>
-
Anna Henningsen authored
Automated tooling for race condition detection reports this as a possible problem. It’s unlikely that something bad would happen here (beyond maybe calling `TriggerAsync()` twice), but adding this should be okay. PR-URL: https://github.com/nodejs/node/pull/25911 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Minwoo Jung <minwoo@nodesource.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
Embedders may want to control whether a Node.js instance controls the current process, similar to what we currently have with `Worker`s. Previously, the `isMainThread` flag had a bit of a double usage, both for indicating whether we are (not) running a Worker and whether we can modify per-process state. PR-URL: https://github.com/nodejs/node/pull/25881 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
Use `'close'` rather than `'exit'` to make sure that all stdio has been captured by the time that the event handler is run. PR-URL: https://github.com/nodejs/node/pull/25894 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
-
Anna Henningsen authored
This function is not only helpful for debugging crashes, but can also be used as an ad-hoc debugging statement. PR-URL: https://github.com/nodejs/node/pull/25905 Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
cjihrig authored
PR-URL: https://github.com/nodejs/node/pull/25910 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-