Commit Graph
10747 Commits
Author SHA1 Message Date
Michael Dawson caa16b41d6 tls: prevent server from using dhe keys < 768
As part of the fix for logjam, node was upgraded to a
level of openssl which rejects connections to servers that
are using keys smaller than 768 bits. It is still possible,
however, to create a server that uses a smaller key size
and and older client may be able to connect to it.

This PR moves us to a secure by default stance on the
server side as well, preventing the creation of a server
using a dhe key size less than 768. This can be overridden
with the command line option which is also added.

It is derived from

https://github.com/nodejs/node/commit/9b35be58100237365c24ab394d3dc6462f9675e6

which was landed in later io.js/node versions but makes
the limit 1024.  This PR uses the smaller limit in order
to meet the recomendations for logjam while matching was
was done on the client side in openssl to minimize the
potential impacton users.

The command line option will only be documented in the
release notes and will not be added to the tls
documentation.  The goal is that people who are
upgrading are aware and can use the option if they
run into issues, but otherwise the option is not
visible/used.

PR-URL: https://github.com/nodejs/node/pull/3890
Fixes: https://github.com/nodejs/LTS/issues/49
Reviewed-By: Myles Borins <mborins@us.ibm.com>
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Rod Vagg <r@va.gg>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-11-23 11:30:50 -05:00
Forrest L Norvell ca97fb6be3 deps: upgrade npm to 2.14.9
This is a roll-up release that includes all changes to npm since 2.13.4.

PR-URL: https://github.com/nodejs/node/pull/3684
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-14 16:46:05 -08:00
Ben Noordhuis 83441616a5 build: fix --without-ssl compile time error
Fix the following build error by putting #if guards around the
variables:

    ../src/node.cc: In function 'void node::ParseArgs(int*,
    const char**, int*, const char***, int*, const char***)':
    ../src/node.cc:3037:7: error: 'SSL2_ENABLE' was not declared
    in this scope
           SSL2_ENABLE = true;
           ^
    ../src/node.cc:3039:7: error: 'SSL3_ENABLE' was not declared
    in this scope
           SSL3_ENABLE = true;

Fixes: https://github.com/nodejs/node-v0.x-archive/issues/8645
PR-URL: https://github.com/nodejs/node/pull/3825
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-11-14 16:35:27 -08:00
Jeremy Whitlock f0453caea2 domains: port caeb677 from v0.10 to v0.12
caeb677
Do not abort the process if an error is thrown from within a domain,
an error handler is setup for the domain and
--abort-on-uncaught-exception was passed on the command line.

However, if an error is thrown from within the top-level domain's
error handler and --abort-on-uncaught-exception was passed on the
command line, make the process abort.

Fixes: #8877

Fixes: https://github.com/nodejs/node-v0.x-archive/issues/8877
PR-URL: https://github.com/nodejs/node-v0.x-archive/pull/25835
Reviewed-By: misterdjules - Julien Gilli <jgilli@nodejs.org>
2015-09-30 19:59:10 -04:00
Jeremy Whitlock 1982ed6e63 v8: port fbff705 from v0.10 to v0.12
fbff705
Add v8::Isolate::SetAbortOnUncaughtException() so the user can be
notified when an uncaught exception has bubbled.

Fixes: https://github.com/nodejs/node-v0.x-archive/issues/8877
PR-URL: https://github.com/nodejs/node-v0.x-archive/pull/25835
Reviewed-By: misterdjules - Julien Gilli <jgilli@nodejs.org>
2015-09-30 19:59:10 -04:00
João Reis e07c86e240 build,win: try next MSVS version on failure
Try the next version of Microsoft Visual Studio when vcvarsall.bat
fails to set VCINSTALLDIR.

PR-URL: https://github.com/nodejs/node/pull/2843
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-09-16 06:30:23 -04:00
Lucien Greathouse 8887666b0b build: update manifest to include Windows 10
This is a port of b0dd3bf499 .

Original commit message:

  Windows 10 wasn't listed in the executable manifest.
  This caused problems with trying to detect Windows 10
  via `os.release()`.

  PR-URL: https://github.com/nodejs/io.js/pull/2332
  Reviewed-By: Roman Reiss <me@silverwind.io>

PR-URL: https://github.com/nodejs/node/pull/2843
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-09-16 06:30:22 -04:00
Rod Vagg 08afe4ec8e build: add MSVS 2015 support
This is a port of 4208dc4fef .

Original commit message:

  PR-URL: https://github.com/nodejs/node/pull/2036
  Reviewed-By: Alexis Campailla <alexis@janeasystems.com>

This was ported to v0.10 in https://github.com/nodejs/node-v0.x-archive/pull/25857

PR-URL: https://github.com/nodejs/node/pull/2843
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-09-16 06:30:21 -04:00
João Reis 618b142679 deps,v8: fix compilation in VS2015
To compile with VS2015, the == and != methods in zone-allocator.h need
to be marked const.

This change was introduced upstream in
https://chromium.googlesource.com/v8/v8.git/+/f9e4527f32c2c268cb79428c74ea9703e9db3aec

PR-URL: https://github.com/nodejs/node/pull/2843
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-09-16 06:30:20 -04:00
Andy Polyakov 583734342e deps: fix openssl for MSVS 2015
Backports http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=aab3560b65b9254d17770bb6fe3ca7edd7451429
from openssl upstream, to add support for Visual Studio 2015. This is
already included in the newer openssl 1.0.2.

Original commit message:

  e_os.h: limit _MSC_VER trickery to older compilers.

  PR: #3390

Original pull request:

  http://rt.openssl.org/Ticket/Display.html?user=guest&pass=guest&id=3390

This was ported to v0.10 in https://github.com/joyent/node/pull/25857

PR-URL: https://github.com/nodejs/node/pull/2843
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-09-16 06:30:20 -04:00
Shigeki Ohtsu 02c262a4c6 deps: fix gyp to work on MacOSX without XCode
This is a port of eb459c8151 ,
used as a floating patch over gyp.

Original commit message:

  This issue has already submitted to the upstream in
  https://code.google.com/p/gyp/issues/detail?id=477
  Use this commit until the upstream is to be fixed.

  PR-URL: https://github.com/iojs/io.js/pull/1325
  Reviewed-By: Fedor Indutny <fedor@indutny.com>
  Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

This was ported to v0.10 in https://github.com/joyent/node/pull/25857

PR-URL: https://github.com/nodejs/node/pull/2843
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-09-16 06:30:19 -04:00
João Reis f0fba0bce8 deps: update gyp to 25ed9ac
This is a port of a525c7244e .

Original commit message:

  Gyp update to be able to generate VS2015 projects.

  PR-URL: https://github.com/joyent/node/pull/25857
  Reviewed-By: Alexis Campailla <alexis@janeasystems.com>

PR-URL: https://github.com/nodejs/node/pull/2843
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-09-16 06:30:19 -04:00
João Reis 44d7054252 win: fix custom actions for WiX older than 3.9
This is a port of e192f61514 .

Original commit message:

  Older WiX versions included a header with extern "C" declaration,
  hence the custom action source must be C++.

  Reviewed-By: João Reis <reis@janeasystems.com>
  PR-URL: https://github.com/joyent/node/pull/25569

PR-URL: https://github.com/nodejs/node/pull/2843
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-09-16 06:30:18 -04:00
Julien Gilli 586c4d8b8e win: fix custom actions on Visual Studio != 2013
This is a port of 16bcd68dc5 .

Original commit message:

  The original change that added support for running custom actions
  during the install process (e7c84f82c7)
  assumed that Visual Studio 2013 is used to generate the installer
  file.

  However, that is not always the case, and older versions of Visual
  Studio should allow users to generate Windows installer files. This
  change makes the custom actions visual studio project use the visual
  studio version that is found by vcbuild.bat.

  Reviewed-By: João Reis <reis@janeasystems.com>
  PR-URL: https://github.com/joyent/node/pull/25569

PR-URL: https://github.com/nodejs/node/pull/2843
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
2015-09-16 06:30:17 -04:00
Ben Noordhuis 071c860c2b crypto: replace rwlocks with simple mutexes
It was pointed out by Zhou Ran that the Windows XP implementation of
uv_rwlock_rdlock() and friends may unlock the inner write mutex on a
different thread than the one that locked it, resulting in undefined
behavior.

The only place that uses rwlocks is the crypto module.  Make that use
normal (simple) mutexes instead.

OpenSSL's critical sections are generally very short, with exclusive
access outnumbering shared access by a factor of three or more, so
it's not as if using rwlocks gives a decisive performance advantage.

PR-URL: https://github.com/nodejs/node/pull/2723
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-09-11 12:35:41 +10:00
Tyler Anton 2860c53562 doc: fixed child_process.exec doc
Changed child_process.exec documentation to reflect that the parameters stdout and stderr are instances of Buffer only if {encoding: null}. Otherwise, they are instances of String with the encoding.

Fixes #9434

removed .DS_Store

PR-URL: https://github.com/joyent/node/pull/14088
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: piscisaureus - Bert Belder <bertbelder@gmail.com>
2015-08-28 19:37:58 -04:00
cjihrig b5a0abcfdf child_process: clone spawn options argument
spawnSync() modifies the options argument. This commit makes
a copy of options before any modifications occur.

PR-URL: https://github.com/joyent/node/pull/9159
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
2015-08-27 16:03:33 -04:00
Devin Nakamura 0363cf4a80 tls: Closing parent socket also closes the tls sock
PR-URL: https://github.com/joyent/node/pull/25642
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
2015-08-27 14:54:21 -04:00
Samuel Mills (Henchman) a24db43101 docs: event emitter behavior notice
Updated documentation as per the issue below:
https://github.com/joyent/node/issues/25466

Event listeners can alter parts of the passed object, in some
circumstances the changes are passed to the next listeners
due to pass by reference. This is documentation of that behavior.

PR-URL: https://github.com/joyent/node/pull/25467
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
2015-08-27 14:47:42 -04:00
Evan Lucas 261fa3620f src: fix intermittent SIGSEGV in resolveTxt
Fixes a SIGSEGV by making sure `txt_chunk` is not empty before setting
it on `txt_records`

Fixes: https://github.com/joyent/node/issues/9285
PR-URL: https://github.com/joyent/node/pull/9300
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
2015-08-27 14:19:44 -04:00
João Reis 1f7257b02d test: mark test-https-aws-ssl flaky on linux
PR-URL: https://github.com/joyent/node/pull/25893
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
2015-08-25 07:36:39 -04:00
Steven R. Loomis 4f2456369c build: work around VS2015 issue in ICU <56
This change is a backport of
nodejs/node@4c06515a2f.

Original commit message:

  The particular ufile.c is from
  http://bugs.icu-project.org/trac/changeset/37704
  and should be OK for ICU 54 and 55.

  Also, adds general mechanism for floating patches on top of ICU.

  Fixes: nodejs/node#2279
  PR-URL: nodejs/node#2283
  Reviewed-By: João Reis <reis@janeasystems.com>

Fixes: #25792

PR-URL: https://github.com/joyent/node/pull/25804
Reviewed-By: João Reis <reis@janeasystems.com>
2015-08-24 12:03:01 -04:00
Kat Marchán f693565813 deps: upgrade to npm 2.13.4
PR-URL: https://github.com/joyent/node/pull/25825
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-21 15:27:53 -04:00
Max Deepfield 35bbe98401 Update addons.markdown
libuv link fix

PR-URL: https://github.com/joyent/node/pull/25885
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-21 12:05:27 -04:00
George Kotchlamazashvili 4a91fa11a3 doc: Update docs for os.platform()
Specifies origin and includes a list of possible values

PR-URL: https://github.com/joyent/node/pull/25777
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-19 16:17:12 -04:00
Steven R. Loomis 15030f26fd build: Intl: bump ICU4C from 54 to 55 (backport)
node was using ICU4C 54 ( released 2014-oct-06 )

* Bump to ICU4C 55 ( released 2015-apr-08)
 * Timezone fixes, translation fixes, bug/performance fixes.
 * Speed improvements in date formatting
 * ICU4C 55 changelog: http://site.icu-project.org/download/55
 * CLDR 27 changelog: http://cldr.unicode.org/index/downloads/cldr-27

* Retarget the file exclusions from ICU4C 54 to ICU4C 55
 * (improves on-disk footprint on some platforms)

Fixes: https://github.com/joyent/node/issues/25855

Backport from nodejs/node:
> Originally-Fixes: https://github.com/nodejs/node/issues/2292
> Original-PR-URL: https://github.com/nodejs/node/pull/2293

PR-URL: https://github.com/joyent/node/pull/25856
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: James Snell <jasnell@gmail.com>
2015-08-14 12:32:47 -04:00
Julien Valéry 9a6f1ce416 comma
PR-URL: https://github.com/joyent/node/pull/25811
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-13 12:01:49 -04:00
Chad Walker b03ab02fe8 doc: Change the link for v8 docs to v8dox.com
No offense to @izs, but the doxygen he put up 3.5 years ago isn't
accurate for node 0.12 nor io.js. I'm trying to keep up and have
multiple sets of doxygen of v8 available at http://v8dox.com/

PR-URL: https://github.com/joyent/node/pull/25811
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-13 12:01:49 -04:00
Dyana Rose 1fd8f37efd doc: buffer, adding missing backtick
PR-URL: https://github.com/joyent/node/pull/25811
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-13 12:01:48 -04:00
daveboivin d384bf8f84 Update assert.markdown
The current wording "This module is used for writing unit tests for your applications, you can access it with require('assert')." implies that this module should only be used in development while unit testing.

The article "Error Handling in Node.js" by Joyent (https://www.joyent.com/developers/node/design/errors) uses the assert module in an efficient way to validate required function arguments.

PR-URL: https://github.com/joyent/node/pull/25811
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-13 12:01:48 -04:00
Andrew Murray 89b22ccbe1 Fixed typo
PR-URL: https://github.com/joyent/node/pull/25811
Reviewed-By: James M Snell <jasnell@gmail.com>
2015-08-13 12:01:48 -04:00
James M Snell 162d0db3bb doc: tls.markdown, adjust version from v0.10.39 to v0.10.x
per https://github.com/joyent/node/pull/25591#discussion_r34824389

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:43 -07:00
James M Snell eda2560cdc doc: additional refinement to readable event
Per https://github.com/joyent/node/pull/25635#discussion_r33973696

Additional refinement to the clarification on the `readable` event

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:43 -07:00
James M Snell 881d9bea01 doc: readable event clarification
per https://github.com/joyent/node/issues/14597

Indicate that `'readable'` indicates only that data can
be read from the stream, not that there is actually data
to be consumed. `readable.read([size])` can still return
null. Includes an example that illustrates the point.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:43 -07:00
James M Snell b6378f0c75 doc: stream.unshift does not reset reading state
Per https://github.com/joyent/node/issues/14604,

Document that performing an `unshift` during a read
can have unexpected results. Following the `unshift`
with a `push('')` resets the reading state appropriately.
Also indicate that doing an `unshift` during a read
is not optimal and should be avoided.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:43 -07:00
Daniel Rentz 5ad05af380 Update util.markdown
Fix for https://github.com/joyent/node/issues/25559 (Typo in example of util.deprecate() documentation)

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:42 -07:00
fresheneesz 4952e2b4d2 doc: clarify Readable._read and Readable.push
Minor clarifications around Readable._read and Readable.push
to make their implementation/usage easier to understand.

https://github.com/joyent/node/issues/14124#issuecomment-115392674

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:42 -07:00
James M Snell 14000b97d4 doc: two minor stream doc improvements
per: https://github.com/joyent/node/issues/14596

1. document that a runtime error will occur if you attempt
   to unshift after the end event
2. document that calling read after the end event will return
   null and will not trigger a runtime error

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:42 -07:00
Benjamin Steephenson 8cbf7cb021 docs:events clarify emitter.listener() behavior
Clarifies that emitter.listener() returns a copy, not a reference
Resolves issue #9022

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:41 -07:00
Philippe Laferriere 6b6bd21497 doc: Clarified read method with specified size argument.
Made explicitely clear that when size bytes are not available, it will
return null, unless we've ended, in which case the data remaining in the
buffer will be returned.

Fixes #7273

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:41 -07:00
Jared Fox cb660ab3d3 Update child_process.markdown, spelling
'the' to 'then'

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:41 -07:00
Michele Caini 59c67fe3cd updated documentation for fs.createReadStream
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:40 -07:00
Ville Skyttä 5ccb429ee8 doc, comments: Grammar and spelling fixes
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:40 -07:00
Ville Skyttä 16f547600a doc: Document http.request protocol option
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:40 -07:00
James M Snell 618e4ecda9 doc: add a note about readable in flowing mode
Original: https://github.com/joyent/node/pull/8682

Slightly modified version of the original PR (#8682) to add
appropriate line wrapping and fix a couple of grammar nits.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:39 -07:00
James M Snell 0b165be37b doc: fix line wrapping in buffer.markdown
Fix the line wrapping in buffer.markdown

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:39 -07:00
Sarath 53b6a615a5 Documentation update about Buffer initialization
fixes #7230

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:39 -07:00
Chris Neave b7229debbe docs: Fix default options for fs.createWriteStream()
The documentation for createWriteStream() references an
'encoding' property that has a default value of null. However,
this property is never referenced by createWriteStream() or
WritableState(). Instead a 'defaultEncoding' property is
referenced in WritableState() with a default of 'utf8' if no value
is supplied.

This fix updates the documentation to rename the 'encoding'
property to 'defaultEncoding' and indicate its default value of
'utf8'.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:39 -07:00
James M Snell 70dd13f88d doc: add CleartextStream deprecation notice
Per: https://github.com/joyent/node/issues/8017

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:38 -07:00
James M Snell 418cde0765 doc: mention that mode is ignored if file exists
per: https://github.com/joyent/node/issues/6847

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
2015-08-03 20:44:38 -07:00