Rich Trott
ff00a765dc
tools: lint doc/*.md files
...
Makefile tasks only lint doc/**/*.md files but omit files that match
doc/*.md. This change adds these previously-omitted files to the list of
files to be linted.
PR-URL: https://github.com/nodejs/node/pull/21361
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-16 07:54:34 -07:00
Rich Trott
dabcd4799d
doc: wrap style guide at 80 characters
...
PR-URL: https://github.com/nodejs/node/pull/21361
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-16 07:54:32 -07:00
Rich Trott
dc10ddf034
doc: wrap pull-requests.md at 80 characters
...
PR-URL: https://github.com/nodejs/node/pull/21361
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-16 07:54:30 -07:00
Rich Trott
0b27cb4a7c
doc: remove linking of url text to url
...
Linking URL text to itself is superfluous. It will display as a link in
GitHub anyway. Bonus: This makes it possible to wrap the line at 80
characters.
PR-URL: https://github.com/nodejs/node/pull/21361
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-16 07:54:28 -07:00
Rich Trott
0351f9a0d2
doc: correct styling of _GitHub_ in onboarding doc
...
PR-URL: https://github.com/nodejs/node/pull/21361
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-16 07:54:27 -07:00
Rich Trott
0aa242e32c
doc: wrap releases.md at 80 chars
...
PR-URL: https://github.com/nodejs/node/pull/21361
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-16 07:54:26 -07:00
James M Snell
b505d2a1cf
Revert "workers,trace_events: set thread name for workers"
...
This reverts commit a24b691c6c .
PR-URL: https://github.com/nodejs/node/pull/21363
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-06-15 18:40:43 -07:00
Joseph Gordon
dcad7c93fb
doc: switch the order of Writable and Readable
...
This change places the links to Writable stream and Readble stream
in the order these sections appear when scrolling down the screen.
PR-URL: https://github.com/nodejs/node/pull/21333
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-06-15 22:59:06 +03:00
James M Snell
a24b691c6c
workers,trace_events: set thread name for workers
...
Set the thread name for workers in trace events. Also,
use uint64_t for thread_id_ because there's really no
reason for those to be doubles
PR-URL: https://github.com/nodejs/node/pull/21246
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2018-06-15 09:14:19 -07:00
James M Snell
b55f6a0f01
perf_hooks: remove less useful bootstrap marks
...
While `perf_hooks` is still in experimental, remove less useful
bootstrap milestones.
PR-URL: https://github.com/nodejs/node/pull/21247
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-06-15 09:05:19 -07:00
James M Snell
17e378b51a
perf_hooks: set bootstrap complete in only one place
...
PR-URL: https://github.com/nodejs/node/pull/21247
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-06-15 09:05:19 -07:00
Tobias Nießen
a703df9785
crypto: fix behavior of createCipher in wrap mode
...
The old implementation silently failed in EVP_CipherInit_ex in
EVP_CIPH_WRAP_MODE, this commit should fix that.
PR-URL: https://github.com/nodejs/node/pull/21287
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-06-15 17:58:52 +02:00
Tobias Nießen
0179e940cc
test: fix deprecation warning due to util.print
...
PR-URL: https://github.com/nodejs/node/pull/21265
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-06-15 17:54:31 +02:00
Rod Vagg
772d390746
deps: float ea7abee from openssl / CVE-2018-0732
...
Pending OpenSSL 1.1.0i release.
PR-URL: https://github.com/nodejs/node/pull/21282
Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Upstream: https://github.com/openssl/openssl/commit/ea7abee
Original commit message:
Reject excessively large primes in DH key generation.
CVE-2018-0732
Signed-off-by: Guido Vranken <guidovranken@gmail.com >
(cherry picked from commit 91f7361f47b082ae61ffe1a7b17bb2adf213c7fe)
Reviewed-by: Tim Hudson <tjh@openssl.org >
Reviewed-by: Matt Caswell <matt@openssl.org >
(Merged from https://github.com/openssl/openssl/pull/6457 )
2018-06-15 16:05:01 +10:00
Rich Trott
2749460ddc
doc: make Deprecation cycle explanation more brief
...
The Deprecation cycle explanation in the COLLABORATOR_GUIDE.md file is
now more concise.
PR-URL: https://github.com/nodejs/node/pull/21303
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-06-14 21:20:53 -07:00
Eugene Ostroukhov
8941fb71a6
inspector: stop dragging platform pointer
...
It is now easily accessible from the Environment
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2018-06-14 16:29:41 -07:00
James M Snell
baadc7ade3
src: add node_process.cc
...
Begin moving `process` object function definitions out of
`node.cc` ... continuing the process of making `node.cc`
smaller and easier to maintain.
PR-URL: https://github.com/nodejs/node/pull/21105
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-06-14 15:51:48 -07:00
Michael Dawson
fb3cfd075f
doc: clarify async execute callback usage
...
Clarify that calls to N-API should be avoided in
the 'execute' callback.
PR-URL: https://github.com/nodejs/node/pull/21217
Refs: https://github.com/nodejs/help/issues/1318
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2018-06-14 18:13:15 -04:00
Joyee Cheung
11ae1791e7
tools: add BigInt64Array and BigUint64Array to globals
...
PR-URL: https://github.com/nodejs/node/pull/21255
Refs: https://github.com/nodejs/node/pull/21237
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-06-14 18:55:05 +02:00
Masashi Hirano
271a861e05
test: add test to check colorMode type of Console
...
PR-URL: https://github.com/nodejs/node/pull/21248
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
2018-06-14 18:53:34 +02:00
Jan Krems
e11447a08b
deps: Upgrade node-inspect to 1.11.5
...
Removes the prompt to report a bug when trying to launch the
debugger using a port that is already in use.
Changeset generated via:
```
rm -rf deps/node-inspect node-inspect-* && \
curl -sSL "https://github.com/nodejs/node-inspect/archive/v1.11.5.tar.gz " | \
tar -xzvf - && mv node-inspect-* deps/node-inspect
```
PR-URL: https://github.com/nodejs/node/pull/21055
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-06-14 18:46:01 +02:00
Rich Trott
7a687624b4
doc: move 5 collaborators to emeritus status
...
Move 5 Collaborators to emeritus status. These particular five
Collaborators have done some great stuff, but have been relatively
inactive during the last two years or so. (They have been asked via
email if they would like to remain Collaborators or more to Emeritus.
This isn't a suddent thing.)
PR-URL: https://github.com/nodejs/node/pull/21272
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
2018-06-14 09:33:34 -07:00
djmgit
9310f86cb3
test: removing unnecessary parameter from assert call
...
Removed unnecessary parameter from assert call in
test/parallel/test-stream2-basic.js.
Fixes: https://github.com/nodejs/node/issues/21305
PR-URL: https://github.com/nodejs/node/pull/21307
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-06-14 14:04:07 +02:00
Anna Henningsen
7b46e177ba
lib,src: make StatWatcher a HandleWrap
...
Wrapping libuv handles is what `HandleWrap` is there for.
This allows a decent reduction of state tracking machinery
by moving active-ness tracking to JS, and removing all
interaction with garbage collection.
Refs: https://github.com/nodejs/node/pull/21093
PR-URL: https://github.com/nodejs/node/pull/21244
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-06-14 13:19:17 +02:00
Anna Henningsen
65b2e4b6fa
test: improve statwatcher async_hooks test
...
Modify the `fs.watchFile()` async hooks test to be more
accurate; currently, it relies on undocumented methods
and the fact that they use `MakeCallback()` even though
there is always a JS stack below.
PR-URL: https://github.com/nodejs/node/pull/21244
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-06-14 13:19:07 +02:00
Anna Henningsen
2a08925896
n-api: name CallbackBundle function fields
...
Use field names rather than indices.
Refs: https://github.com/nodejs/node/pull/21072
PR-URL: https://github.com/nodejs/node/pull/21240
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-06-14 13:13:20 +02:00
Vse Mozhet Byt
52bb84b47d
doc: update NODE_OPTIONS section in cli.md
...
PR-URL: https://github.com/nodejs/node/pull/21229
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-14 13:08:50 +02:00
Anna Henningsen
690475958e
src: use %zx in printf for size_t
...
This fixes a compiler warning on Windows.
PR-URL: https://github.com/nodejs/node/pull/21323
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com >
2018-06-14 12:50:40 +02:00
Ujjwal Sharma
82db672991
v8: replace Buffer with FastBuffer in deserialize
...
Replace the Buffer constructor with a FastBuffer in v8.deserialize in
order to avoid calling the Buffer constructor and thus triggering a
deprecation warning from code inside the core.
Fixes: https://github.com/nodejs/node/issues/21181
PR-URL: https://github.com/nodejs/node/pull/21196
Fixes: https://github.com/nodejs/node/issues/21181
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-06-14 11:47:53 +05:30
Jon Moss
60e6991291
doc: add build wg info to releases.md
...
PR-URL: https://github.com/nodejs/node/pull/21275
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-13 23:16:09 -04:00
Anna Henningsen
22c826f5aa
src: do proper error checking in AsyncWrap::MakeCallback
...
At least one method on a native object is added as a getter,
namely `MessagePort.prototype.onmessage`. When a MessagePort
attempts to call this method from C++ in response to receiving
data, it will first invoke that getter and then call the function.
Since `worker.terminate()` interrupts execution, this means
that the getter may fail (without being faulty code on its own).
This means that at least one test exercising these methods in
combination has been flaky and could have crashed, because
we did not actually check that the getter returns a value
so far, resulting in dereferencing an empty `Local`.
The proper fix for this is to use the non-deprecated overload
of `Get()` and check the result like we should be doing.
Also, as a (related) fix, don’t crash if the method
is not a function but rather something else, like a getter
could provide.
Example test failure: https://ci.nodejs.org/job/node-test-commit-linux-containered/4976/nodes=ubuntu1604_sharedlibs_zlib_x64/console
17:56:56 not ok 1955 parallel/test-worker-dns-terminate
17:56:56 ---
17:56:56 duration_ms: 1.237
17:56:56 severity: crashed
17:56:56 exitcode: -11
17:56:56 stack: |-
PR-URL: https://github.com/nodejs/node/pull/21189
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-06-14 00:43:45 +02:00
Myles Borins
61e9e3c26b
doc: move Italo A. Casas to Release Emeritus
...
Have confirmed 1:1 that they are ok with this.
PR-URL: https://github.com/nodejs/node/pull/21315
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Italo A. Casas <me@italoacasas.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-06-13 13:57:38 -04:00
Guy Bedford
8ee604ca71
esm: ensure require.main for CJS top-level loads
...
PR-URL: https://github.com/nodejs/node/pull/21150
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-06-13 17:58:11 +02:00
Myles Borins
eb2d3a3b9c
deps: patch V8 to 6.7.288.46
...
PR-URL: https://github.com/nodejs/node/pull/21260
Refs: https://github.com/v8/v8/compare/6.7.288.45...6.7.288.46
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
2018-06-13 11:12:01 -04:00
Ben Noordhuis
59ace5752a
lib: rename checkIsArrayBufferView()
...
Rename it to validateArrayBufferView() to align with validateInt32()
and friends.
Swap the name and the value in the argument list for consistency,
although any reasonable person will agree it's a crime against
humanity to put the value before the name.
PR-URL: https://github.com/nodejs/node/pull/20816
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-06-13 15:59:08 +02:00
Ben Noordhuis
d669251f67
lib: replace checkUint() with validateInt32()
...
PR-URL: https://github.com/nodejs/node/pull/20816
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-06-13 15:59:06 +02:00
Ben Noordhuis
5691bdfbb7
build: expose openssl scrypt functions to addons
...
Add scrypt functions to the list of exported openssl symbols.
PR-URL: https://github.com/nodejs/node/pull/20816
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-06-13 15:59:02 +02:00
Ben Noordhuis
f1d9c7dbb9
crypto: drop Math.pow(), use static exponentation
...
PR-URL: https://github.com/nodejs/node/pull/20816
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-06-13 15:59:01 +02:00
Ben Noordhuis
078bb0f0a0
crypto: refactor randomBytes()
...
Use the scrypt() infrastructure to reimplement randomBytes() and
randomFill() in a simpler manner.
PR-URL: https://github.com/nodejs/node/pull/20816
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-06-13 15:58:59 +02:00
Ben Noordhuis
c188cc5338
crypto: refactor pbkdf2() and pbkdf2Sync() methods
...
Use the scrypt() infrastructure to reimplement pbkdf2() in a simpler
manner.
PR-URL: https://github.com/nodejs/node/pull/20816
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-06-13 15:58:56 +02:00
Ben Noordhuis
371103dae8
crypto: add scrypt() and scryptSync() methods
...
Scrypt is a password-based key derivation function that is designed to
be expensive both computationally and memory-wise in order to make
brute-force attacks unrewarding.
OpenSSL has had support for the scrypt algorithm since v1.1.0. Add a
Node.js API modeled after `crypto.pbkdf2()` and `crypto.pbkdf2Sync()`.
Changes:
* Introduce helpers for copying buffers, collecting openssl errors, etc.
* Add new infrastructure for offloading crypto to a worker thread.
* Add a `AsyncWrap` JS class to simplify pbkdf2(), randomBytes() and
scrypt().
Fixes: https://github.com/nodejs/node/issues/8417
PR-URL: https://github.com/nodejs/node/pull/20816
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-06-13 15:58:45 +02:00
Ben Noordhuis
58176e352c
crypto: DRY type checking
...
Factor out some common code. The `checkUint()` function will also be
used in a follow-up commit that adds scrypt support to core.
PR-URL: https://github.com/nodejs/node/pull/20816
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-06-13 15:57:16 +02:00
Anna Henningsen
aa2304b8d5
worker,src: display remaining handles if uv_loop_close fails
...
Right now, we crash the process if there are handles remaining
on the event loop when we exit (except for the main thread).
This does not provide a lot of information about causes, though;
in particular, we don’t show which handles are pending and
who own them.
This patch adds debug output to these cases to help with the
situation.
PR-URL: https://github.com/nodejs/node/pull/21238
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-06-13 12:23:36 +02:00
Anna Henningsen
8e2d33f156
src: unify native symbol inspection code
...
Use a single file, and a single interface, for inspecting
symbols in the current process for debugging.
PR-URL: https://github.com/nodejs/node/pull/21238
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-06-13 12:23:36 +02:00
Rich Trott
483bbf097b
meta: remove CODEOWNERS
...
The CODEOWNERS file is not working out. It is not pinging any groups
other than TSC (and more-or-less can't), and it pings TSC mostly for all
the wrong things.
It was a valiant effort, and possible worth revisiting at a future date
when functionality is closer to what we need. But for now, let us bid it
adieu.
PR-URL: https://github.com/nodejs/node/pull/21161
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-06-13 12:24:23 +05:30
Rich Trott
4c166935ae
doc: trim deprecation level definition text
...
Provide more concise explanations of the deprecation levels in
COLLABORATOR_GUIDE.md.
PR-URL: https://github.com/nodejs/node/pull/21241
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Weijia Wang <starkwang@126.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-06-12 21:04:21 -07:00
James M Snell
0d79c84a83
test: add regression test for nghttp2 CVE-2018-1000168
...
PR-URL: https://github.com/nodejs-private/node-private/pull/117
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 20:47:00 -04:00
James M Snell
01bc5713f9
deps: update to nghttp2 1.32.0
...
This fixes CVE-2018-1000168.
PR-URL: https://github.com/nodejs-private/node-private/pull/117
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 20:46:55 -04:00
James M Snell
8bf213dbdc
http2: fixup http2stream cleanup and other nits
...
This fixes CVE-2018-7161.
PR-URL: https://github.com/nodejs-private/node-private/pull/115
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 20:46:45 -04:00
Anna Henningsen
3217e8e66f
src: re-add Realloc() shrink after reading stream data
...
This would otherwise keep a lot of unused memory lying around,
and in particular add up to a page per chunk of memory overhead
for network reads, potentially opening a DoS vector if the resulting
`Buffer` objects are kept around indefinitely (e.g. stored in a list
and not concatenated until the socket finishes).
This fixes CVE-2018-7164.
Refs: https://github.com/nodejs-private/security/issues/186
Refs: 7c4b09b24b
PR-URL: https://github.com/nodejs-private/node-private/pull/128
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 20:46:15 -04:00