Browse Source

Merge remote-tracking branch 'origin/v0.8'

Conflicts:
	doc/api/http.markdown
	test/simple/test-crypto.js
v0.9.12-release
Ben Noordhuis 12 years ago
parent
commit
2d51036fb9
  1. 2
      doc/api/http.markdown
  2. 88
      doc/blog/release/v0.9.11.md
  3. 2
      lib/http.js
  4. 11
      src/node_crypto.cc
  5. 18
      test/simple/test-crypto.js
  6. 6
      test/simple/test-dgram-pingpong.js

2
doc/api/http.markdown

@ -762,8 +762,6 @@ Just like `'end'`, this event occurs only once per response, and no more
`'data'` events will fire afterwards. See [http.ServerResponse][]'s `'close'` `'data'` events will fire afterwards. See [http.ServerResponse][]'s `'close'`
event for more information. event for more information.
Note: `'close'` can fire after `'end'`, but not vice versa.
### message.httpVersion ### message.httpVersion
In case of server request, the HTTP version sent by the client. In the case of In case of server request, the HTTP version sent by the client. In the case of

88
doc/blog/release/v0.9.11.md

@ -0,0 +1,88 @@
date: Fri Mar 1 11:17:40 PST 2013
version: 0.9.11
category: release
title: Node v0.9.11 (Unstable)
slug: node-v0-9-11-unstable
2013.03.01, Version 0.9.11 (Unstable)
* V8: downgrade 3.14.5
* openssl: update to 1.0.1e
* darwin: Make process.title work properly (Ben Noordhuis)
* fs: Support mode/flag options to read/append/writeFile (isaacs)
* stream: _read() no longer takes a callback (isaacs)
* stream: Add stream.unshift(chunk) (isaacs)
* stream: remove lowWaterMark feature (isaacs)
* net: omit superfluous 'connect' event (Ben Noordhuis)
* build, windows: disable SEH (Ben Noordhuis)
* core: remove errno global (Ben Noordhuis)
* core: Remove the nextTick for running the main file (isaacs)
* core: Mark exit() calls with status codes (isaacs)
* core: Fix debug signal handler race condition lock (isaacs)
* crypto: clear error stack (Ben Noordhuis)
* test: optionally set common.PORT via env variable (Timothy J Fontaine)
* path: Throw TypeError on non-string args to path.resolve/join (isaacs, Arianit Uka)
* crypto: fix uninitialized memory access in openssl (Ben Noordhuis)
Source Code: http://nodejs.org/dist/v0.9.11/node-v0.9.11.tar.gz
Macintosh Installer (Universal): http://nodejs.org/dist/v0.9.11/node-v0.9.11.pkg
Windows Installer: http://nodejs.org/dist/v0.9.11/node-v0.9.11-x86.msi
Windows x64 Installer: http://nodejs.org/dist/v0.9.11/x64/node-v0.9.11-x64.msi
Windows x64 Files: http://nodejs.org/dist/v0.9.11/x64/
Linux 32-bit Binary: http://nodejs.org/dist/v0.9.11/node-v0.9.11-linux-x86.tar.gz
Linux 64-bit Binary: http://nodejs.org/dist/v0.9.11/node-v0.9.11-linux-x64.tar.gz
Solaris 32-bit Binary: http://nodejs.org/dist/v0.9.11/node-v0.9.11-sunos-x86.tar.gz
Solaris 64-bit Binary: http://nodejs.org/dist/v0.9.11/node-v0.9.11-sunos-x64.tar.gz
Other release files: http://nodejs.org/dist/v0.9.11/
Website: http://nodejs.org/docs/v0.9.11/
Documentation: http://nodejs.org/docs/v0.9.11/api/
Shasums:
```
2e11c53449523642f1b3f2cad9726d032ebf0a1b node-v0.9.11-darwin-x64.tar.gz
6a8c18185d67ff50979a143b9e100d56b35aedde node-v0.9.11-darwin-x86.tar.gz
16a95dfc6974ba3562801d9f7bb9e2fa0c001d32 node-v0.9.11-linux-x64.tar.gz
4711aae106edf9a2bf9f644b08db1b608e9829c1 node-v0.9.11-linux-x86.tar.gz
897c21d0fc59faebbdf515e0dfee27551386c4af node-v0.9.11-sunos-x64.tar.gz
09c2b469ef984237bbd606d78f523d1c8b92e680 node-v0.9.11-sunos-x86.tar.gz
81627efd5c591f636147100e2e95bbbb17fd0290 node-v0.9.11-x86.msi
a0e91028c7fd091db1667ccf9dba6216ee321e98 node-v0.9.11.pkg
66370601eb824305b12c7f3e5b2a5e8ca94f1209 node-v0.9.11.tar.gz
db08f56a8258dd8a6a525595a023ad9eb72603e6 node.exe
759fe57cbceeee5820c7de176b6ef8c2a5af7fab node.exp
299f0f8aebbc755b37fc6b40e463cb455a5bb1c6 node.lib
f12b3dc557ae16834ae3a793d768e251d1ba5db3 node.pdb
807520a39d6f7518e53da796fa1ca62316219146 x64/node-v0.9.11-x64.msi
e27a6adc077629ae9a367b4a5cb7fb31853863d3 x64/node.exe
fdcf8ccea3b2c5e3f4f99fa606715e1e27a96acc x64/node.exp
fa0db53aac8d97bab3566c7d80fceb8e148c6d0d x64/node.lib
e24cf62376b8439ae40b84d37c55ab23fbad4e47 x64/node.pdb
```

2
lib/http.js

@ -505,7 +505,7 @@ OutgoingMessage.prototype._writeRaw = function(data, encoding) {
var timer = setTimeout(function() { var timer = setTimeout(function() {
socket.emit('close'); socket.emit('close');
}); });
socket.on('close', function() { socket.once('close', function() {
clearTimeout(timer); clearTimeout(timer);
}); });
} }

11
src/node_crypto.cc

@ -2279,11 +2279,7 @@ class Cipher : public ObjectWrap {
int r = cipher->CipherFinal(&out_value, &out_len); int r = cipher->CipherFinal(&out_value, &out_len);
assert(out_value != NULL); if (out_len <= 0 || r == 0) {
assert(out_len != -1 || r == 0);
if (out_len == 0 || r == 0) {
// out_value always get allocated.
delete[] out_value; delete[] out_value;
out_value = NULL; out_value = NULL;
if (r == 0) return ThrowCryptoTypeError(ERR_get_error()); if (r == 0) return ThrowCryptoTypeError(ERR_get_error());
@ -2593,10 +2589,7 @@ class Decipher : public ObjectWrap {
int r = cipher->DecipherFinal(&out_value, &out_len); int r = cipher->DecipherFinal(&out_value, &out_len);
assert(out_value != NULL); if (out_len <= 0 || r == 0) {
assert(out_len != -1);
if (out_len == 0 || r == 0) {
delete [] out_value; // allocated even if out_len == 0 delete [] out_value; // allocated even if out_len == 0
out_value = NULL; out_value = NULL;
if (r == 0) return ThrowCryptoTypeError(ERR_get_error()); if (r == 0) return ThrowCryptoTypeError(ERR_get_error());

18
test/simple/test-crypto.js

@ -865,3 +865,21 @@ assertSorted(crypto.getHashes());
var s = c.update('test', 'utf8', 'base64') + c.final('base64'); var s = c.update('test', 'utf8', 'base64') + c.final('base64');
assert.equal(s, '375oxUQCIocvxmC5At+rvA=='); assert.equal(s, '375oxUQCIocvxmC5At+rvA==');
})(); })();
// Error path should not leak memory (check with valgrind).
assert.throws(function() {
crypto.pbkdf2('password', 'salt', 1, 20, null);
});
// Calling Cipher.final() or Decipher.final() twice should error but
// not assert. See #4886.
(function() {
var c = crypto.createCipher('aes-256-cbc', 'secret');
try { c.final('xxx') } catch (e) { /* Ignore. */ }
try { c.final('xxx') } catch (e) { /* Ignore. */ }
try { c.final('xxx') } catch (e) { /* Ignore. */ }
var d = crypto.createDecipher('aes-256-cbc', 'secret');
try { d.final('xxx') } catch (e) { /* Ignore. */ }
try { d.final('xxx') } catch (e) { /* Ignore. */ }
try { d.final('xxx') } catch (e) { /* Ignore. */ }
})();

6
test/simple/test-dgram-pingpong.js

@ -103,9 +103,9 @@ function pingPongTest(port, host) {
} }
// All are run at once, so run on different ports // All are run at once, so run on different ports
pingPongTest(20989, 'localhost'); pingPongTest(common.PORT + 0, 'localhost');
pingPongTest(20990, 'localhost'); pingPongTest(common.PORT + 1, 'localhost');
pingPongTest(20988); pingPongTest(common.PORT + 2);
//pingPongTest('/tmp/pingpong.sock'); //pingPongTest('/tmp/pingpong.sock');
process.on('exit', function() { process.on('exit', function() {

Loading…
Cancel
Save