0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

2912 Commits

Author SHA1 Message Date
Fedor Indutny
687dfc9875 crypto: separate altname extensions with ", "
In newly introduced `SafeX509ExtPrint` I forgot to insert separators
between extensions, which lead to the "DNS:...DNS:..." thing for npm.

Fix: iojs/io.js#105
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/113.patch
2014-12-11 00:07:58 +07:00
Bert Belder
4efc02a582 test: fix test-fs-symlink-dir-junction-relative
* The test no longer relies on being invoked from a particular
    working directory to function properly.
  * fs.symlink() and fs.symlinkSync() are both tested.
  * The test now cleans up after itself.

This commit fixes https://github.com/iojs/io.js/issues/126

PR-URL: https://github.com/iojs/io.js/pull/129
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-09 21:16:29 +01:00
cjihrig
8e272dffa2 test: add test for spawnSync() env option
PR-URL: https://github.com/joyent/node/pull/8845
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-09 18:41:36 +01:00
Bert Belder
2b6a0f85f3 src: remove the tracing module entirely
PR-URL: https://github.com/iojs/io.js/pull/124
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-09 17:57:19 +01:00
Trevor Norris
819690fd98 src: all wraps now use actual FunctionTemplate
Instead of simply creating a new v8::Object to contain the connection
information, instantiate a new instance of a FunctionTemplate. This will
allow future improvements for debugging and performance probes.

Additionally, the "provider" argument in the ReqWrap constructor is no
longer optional.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-09 17:57:15 +01:00
Trevor Norris
0d60ab3efe src: remove Async Listener
Async Listener was the name of the user-facing JS API, and is being
completely removed. Instead low level hooks directly into the mechanism
that AL used will be introduced in a future commit.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-09 17:57:12 +01:00
Bert Belder
4d94658918 test: mark test-net-GH-5504 as flaky on linux
That test can trigger a bug on some older Linux kernels.

PR-URL: https://github.com/iojs/io.js/pull/124
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-09 17:57:12 +01:00
Jonathan Johnson
c90eac7e0e url: change hostname regex to negate invalid chars
Regarding joyent/node#8520

This changes hostname validation from a whitelist regex approach
to a blacklist regex approach as described in https://url.spec.whatwg.org/#host-parsing.

url.parse misinterpreted `https://good.com+.evil.org/`
as `https://good.com/+.evil.org/`.  If we use url.parse to check the
validity of the hostname, the test passes, but in the browser the
user is redirected to the evil.org website.
2014-12-09 17:57:10 +01:00
Vladimir Kurchatkin
f1f511fd22 smalloc: don't allow to dispose typed arrays
PR-URL: https://github.com/joyent/node/pull/8743
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-09 17:57:09 +01:00
Bert Belder
dd7ce69097 test-require-resolve: use case insensitive compare
The test fixtures directory is derived from the path to the currently
running script, which is itself specified on the command line. That
means that the case of the fixtures dir may not match what the test
expects (when executed on a case-insensitive file system).

PR-URL: https://github.com/iojs/io.js/pull/116
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-09 15:36:31 +01:00
Bert Belder
7014b7c069 test: make fs-symlink-dir-junction-relative pass on unix 2014-12-09 08:08:51 +01:00
Vincent Weevers
764c5c7fd1 fs: resolve junction targets relative to their parent
PR-URL: https://github.com/joyent/node/pull/8813
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2014-12-09 03:00:50 +01:00
Nikolai Vavilov
e24fa83e69 Revert "path: resolve normalize drive letter to lower case"
This reverts commit f6e5740180.

Changing drive letters to lowercase violates the principle of
least surprise. Other functions that do this should get fixed too.

Conflicts:
	lib/path.js

PR-URL: https://github.com/iojs/io.js/pull/100
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2014-12-08 17:35:52 +01:00
Robert Kowalski
36777d2a5f module: test for directories, fix require with ..
Given my home-directory is `/Users/rocko` - and I have a file named
`npm.json` in it and also a repository with name `npm`, which is a
folder for the node-module.

When try to require the `/Users/rocko/npm/index.js` two direcotry
levels down in the npm folder (e.g. `/Users/rocko/npm/test/tap`)
with require("../../") node will load `/Users/rocko/npm/index.json`.

When I use require("../..") node will load `/Users/rocko/npm.json`
which is fixed by this commit.

PR-URL: https://github.com/iojs/io.js/pull/58
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
2014-12-06 22:14:05 +01:00
Evan Lucas
3ac4941953 net: give better error messages
Add address and/or port to errors where applicable for better reporting.
In the event the local address and port are accessible, it will also add
those to the error message.

See joyent/node#7005
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/35
2014-12-07 01:45:16 +03:00
cjihrig
616343bc61 debugger: use requireRepl() to load debugger repl
Currently, the debugger uses require('repl') to setup the repl.
However, require.extensions is not available yet, causing a
crash on tab completion of require('. This commit uses the
module.requireRepl() method to bootstrap the repl.

Fixes: https://github.com/joyent/node/issues/8359
PR-URL: https://github.com/iojs/io.js/pull/49
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-06 15:24:54 -05:00
Ben Noordhuis
b928303d83 test: move simple/test-abort-fatal-error to pummel
Move it from simple/ to pummel/ because it can take an awful long to
run to completion:

    $ time out/x64.release/node test/simple/test-abort-fatal-error.js

    real    0m8.150s
    user    0m0.328s
    sys     0m0.054s

PR-URL: https://github.com/node-forward/node/pull/91
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-12-06 02:37:30 +01:00
Christian Tellnes
2931348372 events: implement EventEmitter#getMaxListeners()
Fixes https://github.com/joyent/node/issues/8237.

PR-URL: https://github.com/iojs/io.js/pull/82
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-05 22:10:35 +01:00
Yazhong Liu
ba687f6eb4 url: support path for url.format
this adds support for a "path" field that overrides
"query", "search", and "pathname" if given.

Fixes: https://github.com/joyent/node/issues/8722
PR-URL: https://github.com/joyent/node/pull/8755
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-12-02 11:32:08 -08:00
Rod Vagg
d77f490a04 test: extend timeouts in child/exec tests
increased resillence on slower computers

Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/10
2014-11-30 00:27:36 +11:00
Rod Vagg
e0852118cb test: bump --stack-size to stop child fails on ARM
On ARM, we get a "Maximum call stack size exceeded" when using
require() in the child process, bump it up a bit to avoid the
failures so we can test what we are actually after

Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/14
2014-11-30 00:23:57 +11:00
Rod Vagg
013527ad1c test: don't remove empty.txt on win32
on win32 we use empty.txt in the fixtures directory, otherwise we
use a file constructed specifically for this test due to POSIX
socket path length limitations, in which case we need to do
appropriate cleanup

Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/2
2014-11-29 12:43:53 +11:00
Fedor Indutny
d23326b838 test: another fix for test-crypto-stream
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-11-28 17:13:12 +03:00
Fedor Indutny
4d7e89320a test: fix test-crypto-stream
Because of constant-timeness change made in openssl-1.0.1j the error is
no longer returned from EVP_DecryptFinal_ex. Now it just return 0, and
thus the error message does not contain proper error code. Adapt to this
change, there is not much that we could do about it.
2014-11-28 13:42:21 +03:00
James Cowgill
7efc64dc94 test: fix floating point NaN tests on mips
MIPS machines use a slightly different format for NaNs (still perfectly
valid though). This patch adjusts the buffer testcases to allow for
this.

See https://en.wikipedia.org/wiki/NaN#Encoding for some more info.

Based on patch applied to debian by Jérémy Lal <kapouer@melix.org>

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8793
2014-11-27 18:25:00 +03:00
Fedor Indutny
0f66835ea8 crypto: proper fix for d7e700's cause
Remove useless tests, and `ERR_peek_error()` calls. Things are being set
in a proper order now and there is no need for hacky extra checks.

The right order was:

1. Set certificate
2. Set key

Because setting certificate doesn't properly handle key mismatch errors.

Fix: node-forward/node#67
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/node-forward/node/pull/68
2014-11-26 18:41:19 +03:00
Calvin Metcalf
ce56dccb99 crypto: allow creation of GCM ciphers with createCipher
Sets the authenticated encryption specific methods ([set|get]AuthTag and setAAD)
on the Cipher prototype not just the Cipheriv prototype.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/8711
2014-11-25 18:53:35 +03:00
Fedor Indutny
d7e7008c1f crypto: throw if the key doesn't match cert
fix joyent/node#8770
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/node-forward/node/pull/66
2014-11-25 18:51:23 +03:00
Rod Vagg
b594e59543 test: named pipe is invalid when appending .txt
On Windows, appending '.txt' to a named pipe does not produce a valid
regular file name.  We want an empty _file_, not an invalid named pipe.
Fix-up for commit 1f79e4f.

PR-URL: https://github.com/node-forward/node/pull/63
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-11-23 17:11:04 +01:00
Ben Noordhuis
fcbbc7a050 Merge remote-tracking branch 'joyent/v0.12' into v0.12
Conflicts:
	Makefile
	deps/v8/src/base/platform/platform.h

PR-URL: https://github.com/node-forward/node/pull/65
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-11-22 17:55:59 +01:00
Rory Bradford
2d17193f20 path: added parse() and format() functions
The parse() function splits a path and returns an object
with the different elements. The format() function is the
reverse of this and adds an objects corresponding path
elements to make up a string. Fixes #6976.

Fixes: https://github.com/joyent/node/issues/6976
PR-URL: https://github.com/joyent/node/pull/8750
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-11-20 16:21:11 -08:00
Timothy J Fontaine
6a90a06002 path: allow calling platform specific methods
Add path.posix and path.win32 which have the specific methods like
resolve and normalize so you can specifically normalize or resolve
based on the target platform.

PR-URL: https://github.com/joyent/node/pull/5661
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-20 16:10:55 -08:00
Fedor Indutny
963f5e8a88 tls: do not hang without newSession handler
When listening for client hello parser events (like OCSP requests), do
not hang if `newSession` event handler is not present.

fix joyent/node#8660
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/node-forward/node/pull/47
2014-11-20 18:14:57 +03:00
Ben Noordhuis
f8076c4067 lib: add setFlagsFromString() to tracing module
Expose v8::V8::SetFlagsFromString() on tracing.v8 in lib/tracing.js.

PR-URL: https://github.com/node-forward/node/pull/62
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-20 16:08:54 +01:00
Rod Vagg
28c4520bb7 test: fix test-cluster-eaccess to work on windows
properly create an EADDRINUSE condition rather than
simulating one with a plain file

PR-URL: https://github.com/node-forward/node/pull/59
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2014-11-18 17:58:10 +01:00
Rod Vagg
1f79e4f4b4 test: use common.PIPE for emptyTxt path
Work-around for long paths exceeding limits for UNIX socket binds,
emptyTxt would otherwise be burried deep in the fixtures directory.

PR-URL: https://github.com/node-forward/node/pull/51
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2014-11-18 14:21:40 +01:00
Chris Dickinson
0fef250090 dns: propagate domain for c-ares methods
Fixes: https://github.com/joyent/node/issues/5471
PR-URL: https://github.com/joyent/node/pull/8732
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-17 12:34:37 -08:00
Sam Roberts
743a009bad process: pid can be a string in process.kill()
Not allowing string was a change from v0.10 behaviour, commented on in
joyent/node#7991. Allow them again, but still check that argument is
numberish. Also, simplify the fragile and non-portable test code
introduced in 832ec1cd50 that required fixups 2a415358ee, and
ef3c4ed3d.

PR-URL: https://github.com/joyent/node/pull/8531
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-17 12:15:54 -08:00
Vladimir Kurchatkin
f6556b678d fs: fix symlink error message
the arguments were swapped, so fs.symlink{Sync,} would
report that the wrong file EEXIST'd in error.

Fixes: https://github.com/joyent/node/issues/8651
Fixes: https://github.com/joyent/node/issues/4314
Fixes: https://github.com/joyent/node/issues/5381
PR-URL: https://github.com/joyent/node/pull/8657
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
2014-11-15 17:01:13 -08:00
haoxin
00d7b13a18 module: correct the order of the assertions
this puts the type-checking assertions in require
into proper order.

PR-URL: https://github.com/joyent/node/pull/8333
Reviewed-by: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-11-13 19:58:52 -08:00
Rod Vagg
454fbb803a test: kill children before cluster parent
Killing the cluster master first on Windows causes an ESRCH when killing
the children as the OS takes care of them itself.

PR-URL: https://github.com/node-forward/node/pull/53
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-11-10 02:06:45 +01:00
Luis Reis
1183ba47df zlib: support concatenated gzip files
Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/joyent/node/pull/6442
2014-11-09 05:09:10 +03:00
Fedor Indutny
1bb0aeb8f2 crypto: escape DNS altname
Vulnerability credit goes to:

    Calvin Liang conradjliang@hotmail.com

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: ...private
2014-11-08 02:24:07 +03:00
Rod Vagg
b9cecc305b test: use common.PIPE in simple/test-cluster-eaccess
PR-URL: https://github.com/node-forward/node/pull/50
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-11-06 00:13:20 +01:00
Ben Noordhuis
9fb7aee747 test: unlink custom unix socket before test
Unlink NODE_COMMON_PIPE before running the test if set in the
environment.  The test runner won't do it for us like it does
for files in test/tmp.

PR-URL: https://github.com/node-forward/node/pull/40
Reviewed-By: Rod Vagg <rod@vagg.org>
2014-11-05 21:49:11 +01:00
Vladimir Kurchatkin
f65a5cbcde smalloc: check if obj has external data
PR-URL: https://github.com/joyent/node/pull/8655
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-11-05 00:33:00 -08:00
Fedor Indutny
ef46ca61b5 node: do not crash on IPC stdin
When started with IPC pipe on fd=0 child process should not crash when
referencing or using `process.stdin`.

fix joyent/node#8669

PR-URL: https://github.com/node-forward/node/pull/45
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
2014-11-04 11:21:43 -05:00
Vladimir Kurchatkin
849fcdeca0 smalloc: fix copyOnto optimization
copyOnto is broken when one argument has 1 byte size and the other > 1
byte.

PR-URL: https://github.com/joyent/node/pull/8637
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-30 15:49:02 -07:00
Ben Noordhuis
3a9754a27b Merge remote-tracking branch 'joyent/v0.12' into v0.12
Conflicts:
	lib/path.js
2014-10-29 16:15:15 +01:00
cjihrig
c2b4f4809b net: add pauseOnConnect option to createServer()
Currently when a server receives a new connection the underlying socket
handle begins reading data immediately. This causes problems when
sockets are passed between processes, as data can be read by the first
process and thus never read by the second process.

This commit allows sockets that are constructed with a handle to be
paused initially.

PR-URL: https://github.com/joyent/node/pull/8576
Fixes: https://github.com/joyent/node/issues/7905
Fixes: https://github.com/joyent/node/issues/7784
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-27 14:11:20 -07:00