moul / iocat

:wrench: Socket.io & WebSocket netcat-like utility
https://manfred.life/iocat
82 stars 5 forks source link

Update dependency ws to v7 - autoclosed #12

Closed renovate[bot] closed 5 years ago

renovate[bot] commented 5 years ago

This PR contains the following updates:

Package Type Update Change References
ws dependencies major ^1.0.1 -> ^7.0.0 source

Release Notes

websockets/ws ### [`v7.0.0`](https://togithub.com/websockets/ws/releases/7.0.0) [Compare Source](https://togithub.com/websockets/ws/compare/6.2.1...7.0.0) ### Breaking changes - Dropped support for Node.js 6 ([`1e6999b`](https://togithub.com/websockets/ws/commit/1e6999bb)). - Dropped support for `url.Url` instances in the `WebSocket` constructor ([`692d7b4`](https://togithub.com/websockets/ws/commit/692d7b47)). - The behavior of `WebSocket#{p{i,o}ng,send}()` has changed when the `readyState` attribute is not `OPEN` ([#​1532](https://togithub.com/websockets/ws/issues/1532)) - If the readyState attribute is `CONNECTING`, an exception is thrown. - If the readyState attribute is `CLOSING` or `CLOSED` - The `bufferedAmount` attribute is increased by the length of the `data` argument in bytes. - If provided, the `callback` function is called with an error. - No exception is thrown even if the `callback` function is not provided. ### [`v6.2.1`](https://togithub.com/websockets/ws/releases/6.2.1) [Compare Source](https://togithub.com/websockets/ws/compare/6.2.0...6.2.1) ### Bug fixes - Fixed a bug that, under certain circumstances, prevented the close timer from being set ([`aa1dcd5`](https://togithub.com/websockets/ws/commit/aa1dcd5)). ### [`v6.2.0`](https://togithub.com/websockets/ws/releases/6.2.0) [Compare Source](https://togithub.com/websockets/ws/compare/6.1.4...6.2.0) ### Features - Added ability to follow redirects ([#​1490](https://togithub.com/websockets/ws/issues/1490)). ### Bug fixes - The opening handshake is now aborted if the `Sec-WebSocket-Key` header field value is invalid ([`160af45`](https://togithub.com/websockets/ws/commit/160af45b)). ### [`v6.1.4`](https://togithub.com/websockets/ws/releases/6.1.4) [Compare Source](https://togithub.com/websockets/ws/compare/6.1.3...6.1.4) ### Bug fixes - Fixed an issue that caused the `Host` header to always include a port ([#​1510](https://togithub.com/websockets/ws/issues/1510)). ### [`v6.1.3`](https://togithub.com/websockets/ws/releases/6.1.3) [Compare Source](https://togithub.com/websockets/ws/compare/6.1.2...6.1.3) ### Bug fixes - Fixed a bug that, under certain circumstances, prevented the close frame from being parsed ([#​1494](https://togithub.com/websockets/ws/issues/1494)). ### [`v6.1.2`](https://togithub.com/websockets/ws/releases/6.1.2) [Compare Source](https://togithub.com/websockets/ws/compare/6.1.1...6.1.2) ### Bug fixes - Restored compatibility with Node.js < 6.13.0 ([`26436e0`](https://togithub.com/websockets/ws/commit/26436e0)). ### [`v6.1.1`](https://togithub.com/websockets/ws/releases/6.1.1) [Compare Source](https://togithub.com/websockets/ws/compare/6.1.0...6.1.1) ### Bug fixes - Queued messages to send are now discarded if the permessage-deflate is enabled and the socket closes prematurely ([#​1464](https://togithub.com/websockets/ws/issues/1464), [#​1471](https://togithub.com/websockets/ws/issues/1471)). ### [`v6.1.0`](https://togithub.com/websockets/ws/releases/6.1.0) [Compare Source](https://togithub.com/websockets/ws/compare/6.0.0...6.1.0) ### Features - The WebSocket server now emits a `'close'` event when the server closes ([#​1453](https://togithub.com/websockets/ws/issues/1453)). ### [`v6.0.0`](https://togithub.com/websockets/ws/releases/6.0.0) [Compare Source](https://togithub.com/websockets/ws/compare/5.2.2...6.0.0) ### Breaking changes - Dropped support for Node.js 4 ([`d73885c`](https://togithub.com/websockets/ws/commit/d73885c)). - Added a shim that throws an error when used if the package is bundled for the browser ([#​1345](https://togithub.com/websockets/ws/issues/1345)). - Added a `maxPayload` option on the client. Defaults to 100 MiB ([#​1402](https://togithub.com/websockets/ws/issues/1402)). - Dropped support for the `memLevel` and `level` options. Use `zlibDeflateOptions` instead. ([`80e2002`](https://togithub.com/websockets/ws/commit/80e2002)). ### [`v5.2.2`](https://togithub.com/websockets/ws/releases/5.2.2) [Compare Source](https://togithub.com/websockets/ws/compare/5.2.1...5.2.2) ### Bug fixes - Fixed a use after invalidation bug introduced in [`6046a28`](https://togithub.com/websockets/ws/commit/6046a28) ([`8aba871`](https://togithub.com/websockets/ws/commit/8aba871)). ### [`v5.2.1`](https://togithub.com/websockets/ws/releases/5.2.1) [Compare Source](https://togithub.com/websockets/ws/compare/5.2.0...5.2.1) ### Bug fixes - Fixed a bug that could prevent buffered data from being processed under certain circumstances ([`6046a28`](https://togithub.com/websockets/ws/commit/6046a28)). ### [`v5.2.0`](https://togithub.com/websockets/ws/releases/5.2.0) [Compare Source](https://togithub.com/websockets/ws/compare/5.1.1...5.2.0) ### Features - Added ability to specify custom headers when rejecting the handshake ([#​1379](https://togithub.com/websockets/ws/issues/1379)). ### [`v5.1.1`](https://togithub.com/websockets/ws/releases/5.1.1) [Compare Source](https://togithub.com/websockets/ws/compare/5.1.0...5.1.1) ### Bug fixes - Fixed a regression introduced in [`9e152f9`](https://togithub.com/websockets/ws/commit/9e152f9) ([#​1347](https://togithub.com/websockets/ws/issues/1347)). ### [`v5.1.0`](https://togithub.com/websockets/ws/releases/5.1.0) [Compare Source](https://togithub.com/websockets/ws/compare/5.0.0...5.1.0) ### Features - The `address` argument of the `WebSocket` constructor can now be a [`URL`][] instance ([#​1329](https://togithub.com/websockets/ws/issues/1329)). - The `options` argument of the `WebSocket` constructor now accepts any TLS option that is also accepted by [`https.request()`][] ([#​1332](https://togithub.com/websockets/ws/issues/1332)). [`https.request()`]: https://nodejs.org/api/https.html#https_https_request_options_callback [`url`]: https://nodejs.org/api/url.html#url_class_url ### [`v5.0.0`](https://togithub.com/websockets/ws/releases/5.0.0) [Compare Source](https://togithub.com/websockets/ws/compare/4.1.0...5.0.0) ### Breaking changes - Dropped support for Node.js < 4.5.0 ([#​1313](https://togithub.com/websockets/ws/issues/1313)). - The connection is no longer closed if the server does not agree to any of the client's requested subprotocols ([#​1312](https://togithub.com/websockets/ws/issues/1312)). - `net.Socket` errors are no longer re-emitted ([`a4050db`](https://togithub.com/websockets/ws/commit/a4050db)). ### Features - Read backpressure is now properly handled when permessage-deflate is enabled ([#​1302](https://togithub.com/websockets/ws/issues/1302)). ### [`v4.1.0`](https://togithub.com/websockets/ws/releases/4.1.0) [Compare Source](https://togithub.com/websockets/ws/compare/4.0.0...4.1.0) ### Features - Added `WebSocketServer.prototype.address()` ([#​1294](https://togithub.com/websockets/ws/issues/1294)). - Added `zlib{Deflate,Inflate}Options` options ([#​1306](https://togithub.com/websockets/ws/issues/1306)). ### [`v4.0.0`](https://togithub.com/websockets/ws/releases/4.0.0) [Compare Source](https://togithub.com/websockets/ws/compare/3.3.3...4.0.0) ### Breaking changes - The close status code is now set to 1005 if the received close frame contains no status code ([`a31b1f6`](https://togithub.com/websockets/ws/commit/a31b1f6)). - Error messages and types have been updated ([`695c5ea`](https://togithub.com/websockets/ws/commit/695c5ea)). - The `onerror` event handler now receives an `ErrorEvent` instead of JavaScript error ([`63e275e`](https://togithub.com/websockets/ws/commit/63e275e)). - The third argument of `WebSocket.prototype.ping()` and `WebSocket.prototype.pong()` is no longer a boolean but an optional callback ([`30c9f71`](https://togithub.com/websockets/ws/commit/30c9f71)). - The non-standard `protocolVersion` and `bytesReceived` attributes have been removed ([`30c9f71`](https://togithub.com/websockets/ws/commit/30c9f71)...[`ee9b5f3`](https://togithub.com/websockets/ws/commit/ee9b5f3)). - The `extensions` attribute is no longer an object but a string representing the extensions selected by the server ([`fdec524`](https://togithub.com/websockets/ws/commit/fdec524)). - The `'headers'` event on the client has been renamed to `'upgrade'`. Listeners of this event now receive only the `response` argument ([`1c783c2`](https://togithub.com/websockets/ws/commit/1c783c2)). - The `WebSocket.prototype.pause()` and `WebSocket.prototype.resume()` methods have been removed to prevent the user from interfering with the state of the underlying `net.Socket` stream ([`a206e98`](https://togithub.com/websockets/ws/commit/a206e98)). ### [`v3.3.3`](https://togithub.com/websockets/ws/releases/3.3.3) [Compare Source](https://togithub.com/websockets/ws/compare/3.3.2...3.3.3) ### Bug fixes - `net.Socket` errors are no longer swallowed ([`beff620`](https://togithub.com/websockets/ws/commit/beff620)). - The status code and close reason are now always taken from the close frame if received ([`beff620`](https://togithub.com/websockets/ws/commit/beff620)). ### [`v3.3.2`](https://togithub.com/websockets/ws/releases/3.3.2) [Compare Source](https://togithub.com/websockets/ws/compare/3.3.1...3.3.2) ### Bug fixes - The parser of the `Sec-WebSocket-Extensions` header has been rewritten to make it spec-compliant ([#​1240](https://togithub.com/websockets/ws/issues/1240)). ### [`v3.3.1`](https://togithub.com/websockets/ws/releases/3.3.1) [Compare Source](https://togithub.com/websockets/ws/compare/3.3.0...3.3.1) ### Bug fixes - Fixed a DoS vulnerability ([`c4fe466`](https://togithub.com/websockets/ws/commit/c4fe466)). A specially crafted value of the `Sec-WebSocket-Extensions` header that used `Object.prototype` property names as extension or parameter names could be used to make a ws server crash. ```js const WebSocket = require('ws'); const net = require('net'); const wss = new WebSocket.Server({ port: 3000 }, function () { const payload = 'constructor'; // or ',;constructor' const request = [ 'GET / HTTP/1.1', 'Connection: Upgrade', 'Sec-WebSocket-Key: test', 'Sec-WebSocket-Version: 8', `Sec-WebSocket-Extensions: ${payload}`, 'Upgrade: websocket', '\r\n' ].join('\r\n'); const socket = net.connect(3000, function () { socket.resume(); socket.write(request); }); }); ``` The vulnerability has been privately reported by Nick Starke and Ryan Knell of Sonatype Security Research and promptly fixed. Please update now! ### [`v3.3.0`](https://togithub.com/websockets/ws/releases/3.3.0) [Compare Source](https://togithub.com/websockets/ws/compare/3.2.0...3.3.0) ### Features - Added `ecdhCurve` option ([#​1228](https://togithub.com/websockets/ws/issues/1228)). ### [`v3.2.0`](https://togithub.com/websockets/ws/releases/3.2.0) [Compare Source](https://togithub.com/websockets/ws/compare/3.1.0...3.2.0) ### Features - Added ability to specify the compression level ([#​1199](https://togithub.com/websockets/ws/issues/1199)). - Added ability to limit the number of concurrent calls to zlib ([#​1204](https://togithub.com/websockets/ws/issues/1204)). ### [`v3.1.0`](https://togithub.com/websockets/ws/releases/3.1.0) [Compare Source](https://togithub.com/websockets/ws/compare/3.0.0...3.1.0) ### Features - Added ability to specify the handshake request timeout ([#​1177](https://togithub.com/websockets/ws/issues/1177)). ### Bug fixes - Fixed an issue where `CloseEvent#wasClean` was incorrectly set to `false` for close codes in the 3000-4999 range ([#​1146](https://togithub.com/websockets/ws/issues/1146)). ### [`v3.0.0`](https://togithub.com/websockets/ws/releases/3.0.0) [Compare Source](https://togithub.com/websockets/ws/compare/2.3.1...3.0.0) ### Breaking changes - Removed the `upgradeReq` property ([#​1099](https://togithub.com/websockets/ws/issues/1099)). - Removed unnecessary events ([#​1100](https://togithub.com/websockets/ws/issues/1100)). - Removed the `flags` argument from the `'message'`, `'ping'`, and `'pong'` events ([#​1101](https://togithub.com/websockets/ws/issues/1101)). - The permessage-deflate extension is now disabled by default on the server ([#​1107](https://togithub.com/websockets/ws/issues/1107)). ### [`v2.3.1`](https://togithub.com/websockets/ws/releases/2.3.1) [Compare Source](https://togithub.com/websockets/ws/compare/2.3.0...2.3.1) ### Bug fixes - Fixed an issue that prevented `WebSocket.prototype.close()` from working properly when called from a listener of the `headers` event ([`732aaf0`](https://togithub.com/websockets/ws/commit/732aaf0)). ### [`v2.3.0`](https://togithub.com/websockets/ws/releases/2.3.0) [Compare Source](https://togithub.com/websockets/ws/compare/2.2.3...2.3.0) ### Features - All hooks have now access to the upgrade request ([#​1070](https://togithub.com/websockets/ws/issues/1070)). - The `WebSocket` client now emits a `headers` event ([#​1082](https://togithub.com/websockets/ws/issues/1082)). ### [`v2.2.3`](https://togithub.com/websockets/ws/releases/2.2.3) [Compare Source](https://togithub.com/websockets/ws/compare/2.2.2...2.2.3) ### Notable changes - Added support for Node.js 4.1.0 - 4.4.7 ([#​1059](https://togithub.com/websockets/ws/issues/1059)). ### Bug fixes - Fixed a bug that caused the `options` argument to be reassigned when `protocols` was `null` ([`20bd7c7`](https://togithub.com/websockets/ws/commit/20bd7c7)). ### [`v2.2.2`](https://togithub.com/websockets/ws/releases/2.2.2) [Compare Source](https://togithub.com/websockets/ws/compare/2.2.1...2.2.2) ### Bug fixes - Fixed a linter issue that prevented tests from running on [CITGM](https://togithub.com/nodejs/citgm) ([#​1050](https://togithub.com/websockets/ws/issues/1050)). ### [`v2.2.1`](https://togithub.com/websockets/ws/releases/2.2.1) [Compare Source](https://togithub.com/websockets/ws/compare/2.2.0...2.2.1) ### Bug fixes - `WebSocket.prototype.terminate()` now closes the connection immediately even if the other peer fails to work properly ([#​1033](https://togithub.com/websockets/ws/issues/1033)). ### [`v2.2.0`](https://togithub.com/websockets/ws/releases/2.2.0) [Compare Source](https://togithub.com/websockets/ws/compare/2.1.0...2.2.0) ### Features - Added "fragments" as possible value for the `binaryType` attribute ([#​1018](https://togithub.com/websockets/ws/issues/1018)). ### Bug fixes - A random masking key is now also used for zero-length frames ([`5edb460`](https://togithub.com/websockets/ws/commit/5edb460)). ### [`v2.1.0`](https://togithub.com/websockets/ws/releases/2.1.0) [Compare Source](https://togithub.com/websockets/ws/compare/2.0.3...2.1.0) ### Features - Added ability to specify URL path with UNIX domain socket URLs ([`060b275`](https://togithub.com/websockets/ws/commit/060b275)). ### Bug fixes - Fixed a bug that could make the parser crash if an error was emitted synchronously on the socket while parsing data ([`6695bd4`](https://togithub.com/websockets/ws/commit/6695bd4)). ### [`v2.0.3`](https://togithub.com/websockets/ws/releases/2.0.3) [Compare Source](https://togithub.com/websockets/ws/compare/2.0.2...2.0.3) ### Bug fixes - Fixed an issue that caused a stack overflow when parsing a buffer with thousands of frames ([#​992](https://togithub.com/websockets/ws/issues/992)). - Restored support for default port numbers ([`f043b52`](https://togithub.com/websockets/ws/commit/f043b52)). ### [`v2.0.2`](https://togithub.com/websockets/ws/releases/2.0.2) [Compare Source](https://togithub.com/websockets/ws/compare/2.0.1...2.0.2) ### Notable changes - Added support for `bufferutil@2` and `utf-8-validate@3` ([`466e210`](https://togithub.com/websockets/ws/commit/466e210)). ### [`v2.0.1`](https://togithub.com/websockets/ws/releases/2.0.1) [Compare Source](https://togithub.com/websockets/ws/compare/2.0.0...2.0.1) ### Bug fixes - Fixed a bug that caused wrong frames to be created ([`d856dcb`](https://togithub.com/websockets/ws/commit/d856dcb)). ### [`v2.0.0`](https://togithub.com/websockets/ws/releases/2.0.0) [Compare Source](https://togithub.com/websockets/ws/compare/1.1.5...2.0.0) ### Breaking changes - Dropped support for Node.js < 4.5.0. - The `new` operator is now required to create all instances as we moved to ES6 classes. - Error messages have been simplified. - The `clients` property of the `WebSocketServer` is no longer an `Array` but a `Set` and is only set if the `clientTracking` option is truthy ([#​806](https://togithub.com/websockets/ws/issues/806)). - The default HTTP status message is now used when handshake fails ([`41e7cae`](https://togithub.com/websockets/ws/commit/41e7cae)). - Removed support for the Hixie-76 version of the protocol ([#​871](https://togithub.com/websockets/ws/issues/871)). - Removed ability to specify different paths for multiple `WebSocketServer`s when binding them to the same underlying HTTP/s server ([#​885](https://togithub.com/websockets/ws/issues/885)). - Removed `WebSocket.prototype.stream()` and ability to pass a readable stream to `WebSocket.prototype.send()` ([#​875](https://togithub.com/websockets/ws/issues/875)). - Removed callback argument from `handleProtocols` handler ([#​890](https://togithub.com/websockets/ws/issues/890)). - Removed `supports` property from `WebSocket` ([#​918](https://togithub.com/websockets/ws/issues/918)). - Removed `WebSocket.createServer()`, `WebSocket.createConnection()`, and `WebSocket.connect()` factory functions ([#​926](https://togithub.com/websockets/ws/issues/926)). - The second argument of `WebSocket.prototype.ping()` and `WebSocket.prototype.pong()` is no longer an options object but a boolean ([#​951](https://togithub.com/websockets/ws/issues/951)). - An error is emitted if `WebSocket.prototype.close()` is called before the connection is established ([#​956](https://togithub.com/websockets/ws/issues/956)). The following breaking changes only apply if you required the mentioned classes directly. - Removed `Sender` inheritance from `EventEmitter` ([#​861](https://togithub.com/websockets/ws/issues/861)). - Removed `BufferPool` class ([`73ab370`](https://togithub.com/websockets/ws/commit/73ab370)). - Made `extensions` a required argument for the `Receiver` constructor ([`5f53194`](https://togithub.com/websockets/ws/commit/5f53194)). - `receiver.onbinary` and `receiver.ontext` have been merged into `receiver.onmessage` ([#​939](https://togithub.com/websockets/ws/issues/939)). ### Features - Added ability to set TCP backlog for `WebSocketServer` ([#​795](https://togithub.com/websockets/ws/issues/795)). - Added `checkServerIdentity` option to `WebSocket` ([#​701](https://togithub.com/websockets/ws/issues/701)). - Added a `threshold` option for permessage-deflate to only compress messages whose size is bigger than `threshold` ([`6b3904b`](https://togithub.com/websockets/ws/commit/6b3904b)). - Added `shouldHandle` method to `WebSocketServer` to see if a request should be accepted or rejected. This method can be overridden by the user if a custom logic is desired ([`6472425`](https://togithub.com/websockets/ws/commit/6472425)). - Added `removeEventListener` method to `WebSocket` ([`078e96a`](https://togithub.com/websockets/ws/commit/078e96a)). - Added `family` option to `WebSocket` ([#​962](https://togithub.com/websockets/ws/issues/962)). ### Bug fixes - Fixed an issue that prevented permessage-deflate options from being correctly handled ([#​744](https://togithub.com/websockets/ws/issues/744)). - All `error` events are now emitted with a proper `Error` instance ([#​789](https://togithub.com/websockets/ws/issues/789)). - Fixed an issue that could cause a stack overflow crash ([#​810](https://togithub.com/websockets/ws/issues/810)). - Added 1012 and 1013 to the list of allowed close codes ([`b58f688`](https://togithub.com/websockets/ws/commit/b58f688)). - Fixed an issue that prevented the connection from being closed when path validation failed ([#​534](https://togithub.com/websockets/ws/issues/534)). - Fixed an issue where the `fin` option of `WebSocket.prototype.send()` was unconditionally set to `true` ([`ea50be7`](https://togithub.com/websockets/ws/commit/ea50be7)). - Fixed an issue that prevented the total length of a fragmented message from being correctly calculated ([`545635d`](https://togithub.com/websockets/ws/commit/545635d)). - Fixed an issue where `zlib.flush()` was called with a wrong flush level ([#​733](https://togithub.com/websockets/ws/issues/733)). - The callback of `WebSocketServer.prototype.close()` is now invoked when the `close` event is emitted by the underlying HTTP/s server ([#​892](https://togithub.com/websockets/ws/issues/892)). - Fixed an issue that prevented the server from listening on IPv6 addresses with default settings ([`dcdc652`](https://togithub.com/websockets/ws/commit/dcdc652)). - Fixed an issue where the `connection` event was emitted even if the client closed the connection during the handshake process ([`04530ad`](https://togithub.com/websockets/ws/commit/04530ad)). - The masking key is now generated using `crypto.randomBytes()` instead of `Math.random()` ([`7253f06`](https://togithub.com/websockets/ws/commit/7253f06)). - Fixed an issue that, under particular circumstances, caused data to be discarded ([#​945](https://togithub.com/websockets/ws/issues/945)). - Fixed an issue that prevented clients from being removed from the `clients` set ([#​955](https://togithub.com/websockets/ws/issues/955)). - `WebSocket.prototype.close()` now works as expected if called on the client before the connection is established ([#​956](https://togithub.com/websockets/ws/issues/956)). - `WebSocket.prototype.send()` no longer mutates the options object ([#​968](https://togithub.com/websockets/ws/issues/968)). - The `bufferedAmount` getter now takes into account the data queued in the sender ([#​971](https://togithub.com/websockets/ws/issues/971)).

Renovate configuration

:date: Schedule: At any time (no schedule defined).

:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

:recycle: Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".

:no_bell: Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Renovate Bot. View repository job log here.