Commit Graph

1260 Commits

Author SHA1 Message Date
Shigeki Ohtsu
ce58c2c31a doc: remove SSLv2 descriptions
Doc descriptions related to SSLv2 are no longer needed.

Fixes: https://github.com/nodejs/node/pull/5529
PR-URL: https://github.com/nodejs/node/pull/5541
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-03-03 09:53:26 -06:00
James M Snell
2a2d3e1b03 http: strictly forbid invalid characters from headers
PR-URL: https://github.com/nodejs/node-private/pull/21
2016-02-09 08:41:18 -08:00
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

9b35be5810

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
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
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
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
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
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
James M Snell
85bcb281e4 doc: improve http.abort description
Per #4409, the documentation on http.abort is a bit lacking.
This provides a slight improvement.

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
Julien Gilli
f50c37d993 Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	AUTHORS
	ChangeLog
	lib/timers.js
	src/node_version.h
	test/common.js
2015-06-22 11:11:51 -07:00
Julien Gilli
dcb7ef2e40 tls: revert disable RC4 and cipher lists changes
This reverts commit 67d9a56251.

This commit actually reverts both
67d9a56251 and
02a549ed2b (both related to ciphers list
changes). It does it in one commit because reverting
02a549ed2b results in an empty commit.

These changes are not yet ready to be released, and before they are we
want to be able to publish new releases. We're reverting them so that we
can submit a new PR that will contain all these changes plus what's
necessary to be able to land them properly.

Conflicts:
	src/node.cc

PR: #25511
PR-URL: https://github.com/joyent/node/pull/25511
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-06-18 22:37:10 -07:00
Chad Johnston
a294aeef03 doc: Using ciphers with tls.connect()
Refs #25270,#25271

Reviewed-By: Michael Dawson <mhdawsonibm@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25325
2015-05-21 07:14:52 -07:00
Julien Gilli
72188d87d0 tls,crypto: revert recent cipher lists changes
Revert "disable RC4, add --cipher-list command line switch" and
"tls: make --enable-legacy-cipher-list=val less verbose"

This reverts commit f9291a9449 and
b5737bb977.

There is still some work to be done to guarantee secure defaults and a
smooth upgrade path for v0.12.x users. Before this work is finished, we
want to be able to release new versions of v0.12.x. So instead of
waiting for these changes to be ready to ship, revert them and integrate
them when they're ready to be shipped.

Conflicts:
	src/node.cc

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25296
2015-05-13 15:37:32 -07:00
Julien Gilli
0e392f3b68 net: do not set V4MAPPED on FreeBSD
V4MAPPED is not supported on recent FreeBSD versions, at least on 10.1.
Thus, do not set this flag in net.connect on FreeBSD.

Fixes #8540 and #9204.

Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/joyent/node/pull/18204
2015-04-28 16:26:26 -07:00
AlexKVal
9800e0b428 docs: clarify usage of stream.Writable.write
Add separate sample code for the write-after-end case to avoid
confusion.

PR: #15517
PR-URL: https://github.com/joyent/node/pull/15517
Reviewed-By: Julien Gilli <jgilli@fastmail.fm>
2015-04-15 11:27:34 -07:00
James M Snell
f9291a9449 disable RC4, add --cipher-list command line switch
Disable RC4 in the default cipher list

Add the `--cipher-list` command line switch and `NODE_CIPHER_LIST`
environment variable to completely override the default cipher list.

Add the `--enable-legacy-cipher-list` and `NODE_LEGACY_CIPHER_LIST`
environment variable to selectively enable the default cipher list from
previous node.js releases.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/14414
2015-04-08 12:10:49 -07:00
James M Snell
67d9a56251 tls: disable RC4, add --cipher-list command line switch
Disable RC4 in the default cipher list

Add the `--cipher-list` command line switch and `NODE_CIPHER_LIST`
environment variable to completely override the default cipher list.

Add the `--enable-legacy-cipher-list` and `NODE_LEGACY_CIPHER_LIST`
environment variable to selectively enable the default cipher list from
previous node.js releases.

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/14413
2015-04-08 12:00:18 -07:00
Julien Gilli
eb2764a945 Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/ChangeLog
	deps/uv/build.mk
	deps/uv/config-unix.mk
	deps/uv/include/uv-private/uv-win.h
	deps/uv/src/unix/async.c
	deps/uv/src/unix/process.c
	deps/uv/src/version.c
	deps/uv/src/win/poll.c
	deps/uv/test/test-list.h
	deps/uv/uv.gyp
	lib/http.js
	src/node.js
	src/node_version.h
2015-03-16 14:26:55 -07:00
Tyler Anton
51fe319faf docs: add return value for sync fs functions
Clarify that synchronous functions in fs with no return value return
undefined.

Specify that fs.openSync() returns an integer and fs.existsSync()
returns true or false.

Fixes #9313

PR: #9359
PR-URL: https://github.com/joyent/node/pull/9359
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-03-10 16:33:57 -07:00
Robert Kowalski
5d821fe0be doc: add explanations for querystring
- add an article: `decode a non-utf8 string`
 - explain default and fallback behaviour of `querystring.unescape`

PR-URL: https://github.com/joyent/node/pull/9259
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2015-02-25 12:00:53 -08:00
h7lin
f1bf883959 doc: fix default value of opts.decodeURIComponent
In the documentation for querystring.parse, the documentation mentions
that the default value for options.decodeURIComponent is the
decodeURIComponent function, but it's actually the querystring.unescape
function.

PR-URL: https://github.com/joyent/node/pull/9259
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2015-02-25 12:00:44 -08:00
Robert Kowalski
08a1192478 doc: remove broken link to tracing api
closes joyent/node-website#77

PR: #9172
PR-URL: https://github.com/joyent/node/pull/9172
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
2015-02-24 11:32:03 -08:00
Bruno Jouhier
b3aa876f08 fs: properly handle fd passed to truncate()
Currently, fs.truncate() silently fails when a file descriptor
is passed as the first argument. This commit changes this
behavior to properly call fs.ftruncate().

PR-URL: https://github.com/joyent/node/pull/9161
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-02-17 12:09:20 -05:00
Dan Dascalescu
6c60a72d2b doc: fix code syntax
Add a ';' to the end of a function call in documentation.

PR-URL: https://github.com/joyent/node/pull/9198
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-02-12 14:25:33 -07:00
Debjeet Biswas
8d8a2f2190 doc: grammar fix in smalloc
PR-URL: https://github.com/joyent/node/pull/9164
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
2015-02-11 14:48:17 -07:00
Julien Gilli
3b392d33c7 Revert "url: support path for url.format"
This reverts commit d312b6d15c.

d312b6d15c introduced some confusion in
the existing API of url.format and url.parse.

The way the 'path' property overrides other properties in url.format's
input is too confusing for existing users compared to the issues it
fixes.

Fixes such as https://github.com/joyent/node/pull/9081 have been
proposed, but they do not make the API less confusing.

Instead, this change just reverts the original breaking change so that
it gives us more time after v0.12.0 is released to come up with a better
API for url.format, url.parse and other related APIs in the v0.13
development branch.

Fixes #9070.

Conflicts:
	doc/api/url.markdown

PR: #9109
PR-URL: https://github.com/joyent/node/pull/9109
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
2015-01-29 12:07:16 -08:00
Andrei Sedoi
430096a90f doc: use correct signature for assert()
The message argument is optional for both assert() and
assert.ok(). This commit makes message optional for assert().

PR-URL: https://github.com/joyent/node/pull/9003
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-20 10:51:00 -05:00
Andrei Sedoi
e45c52c573 doc: use correct signature for assert()
The message argument is optional for both assert() and
assert.ok(). This commit makes message optional for assert().

PR-URL: https://github.com/joyent/node/pull/9003
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-01-20 10:39:10 -05:00