Граф коммитов

13317 Коммитов

Автор SHA1 Сообщение Дата
Craig Akimoto 4c724dd439 doc: update V8 URL
https://code.google.com/p/v8/ redirects to the V8 issue tracker

PR-URL: https://github.com/nodejs/node/pull/5530
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-02 23:22:29 +01:00
Myles Borins d6608ed47a 2016-03-02, Version 4.3.2 'Argon' (LTS)
This is a security release with only a single commit, an update to openssl due to a recent security advisory. You can read more about the security advisory on the Node.js website https://nodejs.org/en/blog/vulnerability/openssl-march-2016/

* openssl: Upgrade from 1.0.2f to 1.0.2g (Ben Noordhuis) https://github.com/nodejs/node/pull/5507
  - Fix a double-free defect in parsing malformed DSA keys that may potentially be used for DoS or memory corruption attacks. It is likely to be very difficult to use this defect for a practical attack and is therefore considered low severity for Node.js users. More info is available at CVE-2016-0705 https://www.openssl.org/news/vulnerabilities.html#2016-0705.
  - Fix a defect that can cause memory corruption in certain very rare cases relating to the internal `BN_hex2bn()` and `BN_dec2bn()` functions. It is believed that Node.js is not invoking the code paths that use these functions so practical attacks via Node.js using this defect are _unlikely_ to be possible. More info is available at CVE-2016-0797 https://www.openssl.org/news/vulnerabilities.html#2016-0797.
  - Fix a defect that makes the _CacheBleed Atta https://ssrg.nicta.com.au/projects/TS/cachebleed/ _ possible. This defect enables attackers to execute side-channel attacks leading to the potential recovery of entire RSA private keys. It only affects the Intel Sandy Bridge (and possibly older) microarchitecture when using hyper-threading. Newer microarchitectures, including Haswell, are unaffected. More info is available at CVE-2016-0702 https://www.openssl.org/news/vulnerabilities.html#2016-0702.

PR-URL: https://github.com/nodejs/node/pull/5526
2016-03-02 13:39:47 -08:00
Fedor Indutny b010c87164 crypto, string_bytes: treat `buffer` str as `utf8`
Do not treat crypto inputs as `binary` strings, convert them to Buffers
using `new Buffer(..., 'utf8')`, or using newly updated StringBytes
APIs.

PR-URL: https://github.com/nodejs/node/pull/5522
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-02 21:25:04 +03:00
ronkorving 0eda5f503a doc: update NAN urls in ROADMAP.md and doc/releases.md
PR-URL: https://github.com/nodejs/node/pull/5472
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-02 10:04:17 -08:00
firedfox 9beb36ad98 build: remove --quiet from eslint invocation
All eslint rules are configured to report as errors. Remove useless
--quiet flag from eslint invocation in Makefile and vcbuild.bat.

PR-URL: https://github.com/nodejs/node/pull/5519
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-03-02 18:40:59 +01:00
Anton Khlynovskiy c647e87504 lib: freelist: use .pop() for allocation
Array#pop() is known to be faster than Array#shift().
To be exact, it's O(1) vs. O(n). In this case there's no difference
from which side of the "pool" array the object is retrieved,
so .pop() should be preferred.

PR-URL: https://github.com/nodejs/node/pull/2174
Reviewed-By: mscdex - Brian White <mscdex@mscdex.net>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
2016-03-02 09:24:24 -08:00
Rod Vagg 6361c049a9 doc: add CTC meeting minutes 2016-02-17
PR-URL: https://github.com/nodejs/node/pull/5410
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-02 09:10:38 -08:00
Ben Noordhuis 0bea78682a tls: fix assert in context._external accessor
* Restrict the receiver to instances of the FunctionTemplate.
* Use `args.This()` instead of `args.Holder()`.

Fixes: https://github.com/nodejs/node/issues/3682
PR-URL: https://github.com/nodejs/node/pull/5521
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-03-02 17:15:56 +01:00
Rich Trott c133d07b83 test: increase timeout for test-tls-fast-writing
Increase timeout for test from 500ms to 1000ms so busy slow machines
don't produce false positives.

Fixes: https://github.com/nodejs/node/issues/4964
PR-URL: https://github.com/nodejs/node/pull/5466
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
2016-03-02 06:10:00 -08:00
Rich Trott ad36ea56fc test: apply Linux workaround to Linux only
Do not try Ubuntu/SUSE/Debian-specific hostnames for IPv6 localhost
unless we are on Linux.

Fixes: https://github.com/nodejs/node/issues/4546
PR-URL: https://github.com/nodejs/node/pull/5471
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2016-03-01 15:21:05 -08:00
Michael Dawson 32a2a6049d test: allow options for v8 testing
Allow extra options when testing v8 in Node tree

PR-URL: https://github.com/nodejs/node/pull/5502
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-01 18:09:20 -05:00
Rich Trott d9f7a597e4 build: run lint before tests
Have `make test` run linting tools before tests rather than after. Lint
is likely to find issues quickly. Tests may take a while to run. So do
the linting first.

Refs: https://github.com/nodejs/node/issues/4546#issuecomment-189755007
PR-URL: https://github.com/nodejs/node/pull/5470
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-03-01 14:02:26 -08:00
Rich Trott 76e4a74377 benchmark: refactor to eliminate redeclared vars
In order to comply with linting rules used in the rest of the code base,
eliminate redeclared variables. A conservative approach is used so as to
avoid unintentional performance issues (for example, as might be seen in
some situations when using `let` instead of `var`).

PR-URL: https://github.com/nodejs/node/pull/5468
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-03-01 13:48:42 -08:00
Rich Trott 859269724c test: retry on known SmartOS bug
There is a known issue with SmartOS that is generally worked around
in `tools/test.py`. However, a more robust workaround is required for
some tests that open many network connections.

`test-http-regr-gh-2928` is one such test.

Fixes: https://github.com/nodejs/node/issues/5445
Refs: https://github.com/nodejs/node/pull/3941
PR-URL: https://github.com/nodejs/node/pull/5454
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-03-01 13:35:48 -08:00
Ben Noordhuis 32719950df deps: upgrade openssl to 1.0.2g
PR-URL: https://github.com/nodejs/node/pull/5507
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-03-01 18:29:20 +01:00
Trevor Norris a7e49c886f http_parser: use `MakeCallback`
Make `HTTPParser` an instance of `AsyncWrap` and make it use
`MakeCallback`. This means that async wrap hooks will be called on
consumed TCP sockets as well as on non-consumed ones.

Additional uses of `AsyncCallbackScope` are necessary to prevent
improper state from progressing that triggers failure in the
test-http-pipeline-flood.js test. Optimally this wouldn't be necessary,
but for the time being it's the most sure way to allow operations to
proceed as they have.

Fix: https://github.com/nodejs/node/issues/4416
PR-URL: https://github.com/nodejs/node/pull/5419
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-03-01 02:37:27 -07:00
Fedor Indutny da3f425506 crypto: PBKDF2 works with `int` not `ssize_t`
Change types of all PBKDF2 params to `int` as they are `int` in `evp.h`.

Check that `raw_keylen` fits into `int` before passing it to OpenSSL.

Fix: #5396
PR-URL: https://github.com/nodejs/node/pull/5397
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
2016-03-01 09:07:38 +03:00
nettofarah 610bd8d567 url: group slashed protocols by protocol name
Reorder slashed protocols so they are grouped by protocol name. This is
done so it doesn't look like we're duplicating protocol names at the
bottom of the list.

PR-URL: https://github.com/nodejs/node/pull/5380
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-02-29 20:26:59 -06:00
Aayush Naik 93bacfd00f test: remove unneeded bind() and related comments
As mentioned in the comment of the changed file, "a libuv limitation
makes it necessary to bind()". But, that is not the case in this test.
The subsequent call to send() results in an implicit bind().

PR-URL: https://github.com/nodejs/node/pull/5023
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-02-29 16:08:13 -08:00
Santiago Gimeno 98b721ed26 test: fix flaky child-process-fork-regr-gh-2847
The test is still failing sometimes because when trying to establish the
second connection, the server is already closed. Bring back the code
that handled this case and was removed in the last refactoring of the
test. Also ignore the errors that might happen when sending the second
handle to the worker because it may already have exited.

PR-URL: https://github.com/nodejs/node/pull/5422
Reviewed-By: Rich Trott <rtrott@gmail.com>
2016-02-29 15:40:09 -08:00
Owen Smith f296a7f16f path: fix path.relative() for prefixes at root
Fixes #5485

PR-URL: https://github.com/nodejs/node/pull/5490
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-02-29 20:10:04 +01:00
Rich Trott 4d6b4c30dd test: remove flaky designation from fixed tests
`test-tls-ticket-cluster` and `test-vm-syntax-error-stderr` are no
longer flaky.

Refs: https://github.com/nodejs/node/issues/2510
Refs: https://github.com/nodejs/node/issues/2660
PR-URL: https://github.com/nodejs/node/pull/5459
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-02-29 10:42:57 -08:00
Zheng Chaoping 4717ea9186 path: fix win32 parse()
Fix path.win32.parse("/foo/bar") retuns `{root: '' ...}`(v5.7.0),
but not `{root: '/' ...}`(v5.6.0).

PR-URL: https://github.com/nodejs/node/pull/5484
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-29 19:39:56 +01:00
Evan Lucas 3c79bbda47 doc: fix typo in child_process documentation
TSCP should be TCP

PR-URL: https://github.com/nodejs/node/pull/5474
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-02-29 05:35:03 -06:00
Anton Andesen 8d8fef09ee doc: add note for binary safe string reading
`readable.setEncoding(null)` - may be the most preferable way to proxy
a binary data without any encoding/decoding overhead

PR-URL: https://github.com/nodejs/node/pull/5155
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-29 11:08:45 +01:00
Prince J Wesley 40d57b714e repl: fix stack trace column number in strict mode
On strict mode, "'use strict'; void 0; " is added as prefix
in order to prevent "use strict" as the result value
for let/const statements. It causes wrong column number in
stack trace.

PR-URL: https://github.com/nodejs/node/pull/5416
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-29 10:46:31 +01:00
Alexander Makarenko f0c06147b3 doc: improvements to crypto.markdown copy
Fix several typos. Add missing links.

PR-URL: https://github.com/nodejs/node/pull/5230
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Kelvin Knighton <keltheceo@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-28 21:21:01 +01:00
Matteo Collina 725ffdb9b7 dgram: handle default address case when offset and length are specified
Fixes a regression introduced by: https://github.com/nodejs/node/pull/4374.
Adds a new test to avoid similar issue in the future.
The test is disabled on windows, because this feature never worked
there.

Fixes: https://github.com/nodejs/node/issues/5398
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-02-28 11:25:36 +01:00
Rich Trott ffdc046e5c benchmark: add benchmark for buf.compare()
There is a benchmark for the class method `Buffer.compare()` but not for
the instance method `buf.compare()`. This adds that benchmark.

I used this to confirm a performance regression in an implementation I
was considering. While the implementation was a bust, it does seem like
the benchmark is worthwhile.

The benchmark is nearly identical to the existing `Buffer.compare()`
benchmark except, of course, that it calls `buf.compare()` instead.

PR-URL: https://github.com/nodejs/node/pull/5441
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-02-27 20:17:56 -08:00
Rich Trott dcfda1007b tools,benchmark: increase lint compliance
In the hopes of soon having the benchmark code linted, this change
groups all the likely non-controversial lint-compliance changes such as
indentation, semi-colon usage, and single-vs.-double quotation marks.

Other lint rules may have subtle performance implications in the V8
currently shipped with Node.js. Those changes will require more careful
review and will be in a separate change.

PR-URL: https://github.com/nodejs/node/pull/5429
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Brian White <mscdex@mscdex.net>
2016-02-27 20:15:17 -08:00
Owen Smith 7fc6645982 test: add test-cases for posix path.relative()
adds posix test cases for paths similar to those that caused #5447

PR-URL: https://github.com/nodejs/node/pull/5456
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 17:31:03 +01:00
Owen Smith e326950498 path: fix win32 relative() for UNC paths
win32 normalize() will output a trailing '\' for some UNC paths. trim
them before processing

Change by @mscdex

Add basic UNC path tests to win32 relative()

PR-URL: https://github.com/nodejs/node/pull/5456
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 17:30:44 +01:00
Owen Smith b33879d9e2 path: fix win32 relative() when "to" is a prefix
when the basename of "to" was a prefix of the basename of "from" win32
relative() would miss including it in the result

Fixes: https://github.com/nodejs/node/issues/5447
PR-URL: https://github.com/nodejs/node/pull/5456
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 17:29:29 +01:00
Brian White 8b16ba3bbf url: fix off-by-one error with parse()
Fixes: https://github.com/nodejs/node/issues/5393
PR-URL: https://github.com/nodejs/node/pull/5394
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-02-27 14:45:20 +01:00
Brian White 3a331b66f8 path: fix verbose relative() output
Fixes: https://github.com/nodejs/node/issues/5383
PR-URL: https://github.com/nodejs/node/pull/5389
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-02-27 14:42:33 +01:00
Hugo Wood 5298c81f42 doc: `require` behavior on case-insensitive systems
This adds a paragraph in the Module Caching Caveats section about the
behavior of require when Node is running on top of a file system (e.g.
HFS) or operating system (e.g. Windows) that will not consider the case
of file paths to find files.

Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:33:51 +01:00
Tristan Slominski 1411e0b648 doc: document base64url encoding support
Documents that creating a buffer from base64 encoded string
transparently supports "URL and Filename Safe Alphabet" base64url
encoding.

PR-URL: https://github.com/nodejs/node/pull/5243
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Reviewed-By: Alejandro Oviedo <alejandro.oviedo.g@gmail.com>
2016-02-27 14:23:06 +01:00
Jackson Tian c6ae7d00c6 doc: improve httpVersionMajor / httpVersionMajor
The description of httpVersionMajor & httpVersionMinor should
have same context like httpVersion.

PR-URL: https://github.com/nodejs/node/pull/5296
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:18:00 +01:00
Evan Lucas 1c30d606b1 doc: fix relative links in net docs
They were not being processed as relative links.

PR-URL: https://github.com/nodejs/node/pull/5358
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:13:39 +01:00
Brian White a67d5c1034 doc: fix crypto function indentation level
PR-URL: https://github.com/nodejs/node/pull/5460
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:09:31 +01:00
dcposch@dcpos.ch 4e77a7ce29 doc: link to man pages
This changes the doc generator to automatically link references such as
`open(2)` to a man page on man7.org or freebsd.org

PR-URL: https://github.com/nodejs/node/pull/5073
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:06:47 +01:00
Rafael Cepeda 9894c026f5 doc: add missing property in cluster example
`Cluster.setupMaster(options)` Options object was missing an `args`
property on the example.

PR-URL: https://github.com/nodejs/node/pull/5305
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:04:51 +01:00
Chris Dew 1913909fce doc: corrected name of argument in socket.send
Corrected name of "msg" argument from "buf" to "msg".

PR-URL: https://github.com/nodejs/node/pull/5449
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:02:19 +01:00
Alexander Makarenko acee594b6e doc: fix links in tls, cluster docs
Fix missing links described in #5322.

PR-URL: https://github.com/nodejs/node/pull/5364
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-27 14:00:53 +01:00
Rod Vagg 2ccc275fd7 build: update Node.js logo on OSX installer
PR-URL: https://github.com/nodejs/node/pull/5401
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: kahwee
Reviewed-By: fhemberger
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-02-27 16:49:56 +11:00
Sam Roberts 513133c936 doc: correct name of engine methods
ENGINE_METHOD_PKEY_METH and ENGINE_METHOD_PKEY_ASN1_METH are misspelled
in the documentation, both should be ..._METHS.

PR-URL: https://github.com/nodejs/node/pull/5463
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-02-26 19:44:33 -08:00
Sam Roberts 292033b1f5 constants: define ENGINE_METHOD_RSA
constants.ENGINE_METHOD_RSA was documented, but not implemented.

PR-URL: https://github.com/nodejs/node/pull/5463
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-02-26 19:42:56 -08:00
Jeremiah Senkpiel 67963c8c66 timers: greatly improve code comments
Describes the How and Why of the timers implementation, as well as
adding comments in spots that should allow for an easier understanding
about what is going on.

The timers implementation is very efficient, at a cost.
That cost is readable understandability, and this aims to improve that.

PR-URL: https://github.com/nodejs/node/pull/4007
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Julien Gilli <jgilli@nodejs.org>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2016-02-26 18:07:36 -05:00
Jeremiah Senkpiel 60f8c1acf4 timers: refactor timers
Consolidates the implementation of regular and internal (_unrefActive)
timers.

Also includes a couple optimizations:
- Isolates the try/catch from listOnTimeout() in a new tryOnTimeout().
- Uses a TimersList constructor as the base for linkedlists.

Additionally includes other cleanup and clarification, such as a rename
of "Timer" to "TimerWrap".

PR-URL: https://github.com/nodejs/node/pull/4007
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Julien Gilli <jgilli@nodejs.org>
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2016-02-26 18:07:36 -05:00
Rich Trott 3e3d941495 doc,tools,test: lint doc-based addon tests
PR-URL: https://github.com/nodejs/node/pull/5427
Fixes: https://github.com/nodejs/node/issues/5424
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-02-26 11:56:43 -08:00