websockets/ws
### [`v7.5.8`](https://togithub.com/websockets/ws/releases/tag/7.5.8)
[Compare Source](https://togithub.com/websockets/ws/compare/7.5.7...7.5.8)
##### Bug fixes
- Backported [`0fdcc0a`](https://togithub.com/websockets/ws/commit/0fdcc0af) to the 7.x release line ([`2758ed3`](https://togithub.com/websockets/ws/commit/2758ed35)).
- Backported [`d68ba9e`](https://togithub.com/websockets/ws/commit/d68ba9e1) to the 7.x release line ([`dc1781b`](https://togithub.com/websockets/ws/commit/dc1781bc)).
### [`v7.5.7`](https://togithub.com/websockets/ws/releases/tag/7.5.7)
[Compare Source](https://togithub.com/websockets/ws/compare/7.5.6...7.5.7)
##### Bug fixes
- Backported [`6946f5f`](https://togithub.com/websockets/ws/commit/6946f5fe) to the 7.x release line ([`1f72e2e`](https://togithub.com/websockets/ws/commit/1f72e2e1)).
### [`v7.5.6`](https://togithub.com/websockets/ws/releases/tag/7.5.6)
[Compare Source](https://togithub.com/websockets/ws/compare/7.5.5...7.5.6)
### Bug fixes
- Backported [`b8186dd`](https://togithub.com/websockets/ws/commit/b8186dd1) to the 7.x release line ([`73dec34`](https://togithub.com/websockets/ws/commit/73dec34b)).
- Backported [`ed2b803`](https://togithub.com/websockets/ws/commit/ed2b8039) to the 7.x release line ([`22a26af`](https://togithub.com/websockets/ws/commit/22a26afb)).
### [`v7.5.5`](https://togithub.com/websockets/ws/releases/tag/7.5.5)
[Compare Source](https://togithub.com/websockets/ws/compare/7.5.4...7.5.5)
##### Bug fixes
- Backported [`ec9377c`](https://togithub.com/websockets/ws/commit/ec9377ca) to the 7.x release line ([`0e274ac`](https://togithub.com/websockets/ws/commit/0e274acd)).
### [`v7.5.4`](https://togithub.com/websockets/ws/releases/tag/7.5.4)
[Compare Source](https://togithub.com/websockets/ws/compare/7.5.3...7.5.4)
##### Bug fixes
- Backported [`6a72da3`](https://togithub.com/websockets/ws/commit/6a72da3e) to the 7.x release line ([`76087fb`](https://togithub.com/websockets/ws/commit/76087fbf)).
- Backported [`869c989`](https://togithub.com/websockets/ws/commit/869c9892) to the 7.x release line ([`2799793`](https://togithub.com/websockets/ws/commit/27997933)).
### [`v7.5.3`](https://togithub.com/websockets/ws/releases/tag/7.5.3)
[Compare Source](https://togithub.com/websockets/ws/compare/7.5.2...7.5.3)
### Bug fixes
- The `WebSocketServer` constructor now throws an error if more than one of the
`noServer`, `server`, and `port` options are specefied ([`66e58d2`](https://togithub.com/websockets/ws/commit/66e58d27)).
- Fixed a bug where a `'close'` event was emitted by a `WebSocketServer` before
the internal HTTP/S server was actually closed ([`5a58730`](https://togithub.com/websockets/ws/commit/5a587304)).
- Fixed a bug that allowed WebSocket connections to be established after
`WebSocketServer.prototype.close()` was called ([`772236a`](https://togithub.com/websockets/ws/commit/772236a1)).
### [`v7.5.2`](https://togithub.com/websockets/ws/releases/tag/7.5.2)
[Compare Source](https://togithub.com/websockets/ws/compare/7.5.1...7.5.2)
### Bug fixes
- The opening handshake is now aborted if the client receives a
`Sec-WebSocket-Extensions` header but no extension was requested or if the
server indicates an extension not requested by the client ([`aca94c8`](https://togithub.com/websockets/ws/commit/aca94c86)).
### [`v7.5.1`](https://togithub.com/websockets/ws/releases/tag/7.5.1)
[Compare Source](https://togithub.com/websockets/ws/compare/7.5.0...7.5.1)
### Bug fixes
- Fixed an issue that prevented the connection from being closed properly if an
error occurred simultaneously on both peers ([`b434b9f`](https://togithub.com/websockets/ws/commit/b434b9f1)).
### [`v7.5.0`](https://togithub.com/websockets/ws/releases/tag/7.5.0)
[Compare Source](https://togithub.com/websockets/ws/compare/7.4.6...7.5.0)
### Features
- Some errors now have a `code` property describing the specific type of error
that has occurred ([#1901](https://togithub.com/websockets/ws/issues/1901)).
### Bug fixes
- A close frame is now sent to the remote peer if an error (such as a data
framing error) occurs ([`8806aa9`](https://togithub.com/websockets/ws/commit/8806aa9a)).
- The close code is now always 1006 if no close frame is received, even if the
connection is closed due to an error ([`8806aa9`](https://togithub.com/websockets/ws/commit/8806aa9a)).
### [`v7.4.6`](https://togithub.com/websockets/ws/releases/tag/7.4.6)
[Compare Source](https://togithub.com/websockets/ws/compare/7.4.5...7.4.6)
### Bug fixes
- Fixed a ReDoS vulnerability ([`00c425e`](https://togithub.com/websockets/ws/commit/00c425ec)).
A specially crafted value of the `Sec-Websocket-Protocol` header could be used
to significantly slow down a ws server.
```js
for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) {
const value = 'b' + ' '.repeat(length) + 'x';
const start = process.hrtime.bigint();
value.trim().split(/ *, */);
const end = process.hrtime.bigint();
console.log('length = %d, time = %f ns', length, end - start);
}
```
The vulnerability was responsibly disclosed along with a fix in private by
[Robert McLaughlin](https://togithub.com/robmcl4) from University of California, Santa Barbara.
In vulnerable versions of ws, the issue can be mitigated by reducing the maximum
allowed length of the request headers using the [`--max-http-header-size=size`](https://nodejs.org/api/cli.html#cli_max_http_header_size_size)
and/or the [`maxHeaderSize`](https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener) options.
### [`v7.4.5`](https://togithub.com/websockets/ws/releases/tag/7.4.5)
[Compare Source](https://togithub.com/websockets/ws/compare/7.4.4...7.4.5)
### Bug fixes
- UTF-8 validation is now done even if `utf-8-validate` is not installed
([`23ba6b2`](https://togithub.com/websockets/ws/commit/23ba6b29)).
- Fixed an edge case where `websocket.close()` and `websocket.terminate()` did
not close the connection ([`67e25ff`](https://togithub.com/websockets/ws/commit/67e25ff5)).
### [`v7.4.4`](https://togithub.com/websockets/ws/releases/tag/7.4.4)
[Compare Source](https://togithub.com/websockets/ws/compare/7.4.3...7.4.4)
### Bug fixes
- Fixed a bug that could cause the process to crash when using the
permessage-deflate extension ([`9277437`](https://togithub.com/websockets/ws/commit/92774377)).
### [`v7.4.3`](https://togithub.com/websockets/ws/releases/tag/7.4.3)
[Compare Source](https://togithub.com/websockets/ws/compare/7.4.2...7.4.3)
### Bug fixes
- The deflate/inflate stream is now reset instead of reinitialized when context
takeover is disabled ([#1840](https://togithub.com/websockets/ws/issues/1840)).
### [`v7.4.2`](https://togithub.com/websockets/ws/releases/tag/7.4.2)
[Compare Source](https://togithub.com/websockets/ws/compare/7.4.1...7.4.2)
### Bug fixes
- Silenced a deprecation warning ([`a2c0d44`](https://togithub.com/websockets/ws/commit/a2c0d447)).
### [`v7.4.1`](https://togithub.com/websockets/ws/releases/tag/7.4.1)
[Compare Source](https://togithub.com/websockets/ws/compare/7.4.0...7.4.1)
### Bug fixes
- Added a workaround for a double `'error'` event bug in Node.js < 13 which
caused an uncaught error during the WebSocket handshake ([`38d6ab3`](https://togithub.com/websockets/ws/commit/38d6ab3b)).
### [`v7.4.0`](https://togithub.com/websockets/ws/releases/tag/7.4.0)
[Compare Source](https://togithub.com/websockets/ws/compare/7.3.1...7.4.0)
### Features
- The callback of `WebSocketServer.prototype.handleUpgrade()` now takes the
client HTTP GET request as second argument ([`7d39f19`](https://togithub.com/websockets/ws/commit/7d39f19e)).
### Bug fixes
- Read-only properties are now read-only ([`eabed8f`](https://togithub.com/websockets/ws/commit/eabed8fc)).
- The `CONNECTING`, `OPEN`, `CLOSING`, `CLOSED`, `binaryType`, `bufferedAmount`,
`extensions`, `onclose`, `onerror`, `onmessage`, `onopen`, `protocol`,
`readyState`, and `url` properties are now enumerable ([`2069e68`](https://togithub.com/websockets/ws/commit/2069e684)).
### [`v7.3.1`](https://togithub.com/websockets/ws/releases/tag/7.3.1)
[Compare Source](https://togithub.com/websockets/ws/compare/7.3.0...7.3.1)
### Bug fixes
- Improved `websocket.bufferedAmount` accuracy ([`e1349c0`](https://togithub.com/websockets/ws/commit/e1349c04), [`a162942`](https://togithub.com/websockets/ws/commit/a1629426)).
### [`v7.3.0`](https://togithub.com/websockets/ws/releases/tag/7.3.0)
[Compare Source](https://togithub.com/websockets/ws/compare/7.2.5...7.3.0)
### Features
- `WebSocket.prototype.addEventListener()` now supports the `once` option ([#1754](https://togithub.com/websockets/ws/issues/1754)).
### [`v7.2.5`](https://togithub.com/websockets/ws/releases/tag/7.2.5)
[Compare Source](https://togithub.com/websockets/ws/compare/7.2.3...7.2.5)
### Bug fixes
- Fixed compatibility with Node.js master ([`651d662`](https://togithub.com/websockets/ws/commit/651d6627)).
### [`v7.2.3`](https://togithub.com/websockets/ws/releases/tag/7.2.3)
[Compare Source](https://togithub.com/websockets/ws/compare/7.2.2...7.2.3)
### Bug fixes
- `WebSocket#{p{i,o}ng,close}()` now thow an error if the data to send is too
large to fit in a control frame ([`e54f08d`](https://togithub.com/websockets/ws/commit/e54f08da)).
### [`v7.2.2`](https://togithub.com/websockets/ws/releases/tag/7.2.2)
[Compare Source](https://togithub.com/websockets/ws/compare/7.2.1...7.2.2)
### Bug fixes
- Fixed an issue where calling `webSocketStream.end()` could cause the process
to crash ([`9535702`](https://togithub.com/websockets/ws/commit/9535702e)).
- The connection is now closed if a non-masked frame is received on the server
or a masked frame is received on the client ([#1681](https://togithub.com/websockets/ws/issues/1681)).
- The status code 1014 is now allowed to be used ([#1682](https://togithub.com/websockets/ws/issues/1682)).
### [`v7.2.1`](https://togithub.com/websockets/ws/releases/tag/7.2.1)
[Compare Source](https://togithub.com/websockets/ws/compare/7.2.0...7.2.1)
### Bug fixes
- Added `bufferutil` and `utf-8-validate` as peer dependencies ([#1626](https://togithub.com/websockets/ws/issues/1626)).
### [`v7.2.0`](https://togithub.com/websockets/ws/releases/tag/7.2.0)
[Compare Source](https://togithub.com/websockets/ws/compare/7.1.2...7.2.0)
### Features
- Added ability to specify the `readableObjectMode` option when using
`WebSocket.createWebSocketStream()` ([#1647](https://togithub.com/websockets/ws/issues/1647)).
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
^7.1.2
->7.5.8
Release Notes
websockets/ws
### [`v7.5.8`](https://togithub.com/websockets/ws/releases/tag/7.5.8) [Compare Source](https://togithub.com/websockets/ws/compare/7.5.7...7.5.8) ##### Bug fixes - Backported [`0fdcc0a`](https://togithub.com/websockets/ws/commit/0fdcc0af) to the 7.x release line ([`2758ed3`](https://togithub.com/websockets/ws/commit/2758ed35)). - Backported [`d68ba9e`](https://togithub.com/websockets/ws/commit/d68ba9e1) to the 7.x release line ([`dc1781b`](https://togithub.com/websockets/ws/commit/dc1781bc)). ### [`v7.5.7`](https://togithub.com/websockets/ws/releases/tag/7.5.7) [Compare Source](https://togithub.com/websockets/ws/compare/7.5.6...7.5.7) ##### Bug fixes - Backported [`6946f5f`](https://togithub.com/websockets/ws/commit/6946f5fe) to the 7.x release line ([`1f72e2e`](https://togithub.com/websockets/ws/commit/1f72e2e1)). ### [`v7.5.6`](https://togithub.com/websockets/ws/releases/tag/7.5.6) [Compare Source](https://togithub.com/websockets/ws/compare/7.5.5...7.5.6) ### Bug fixes - Backported [`b8186dd`](https://togithub.com/websockets/ws/commit/b8186dd1) to the 7.x release line ([`73dec34`](https://togithub.com/websockets/ws/commit/73dec34b)). - Backported [`ed2b803`](https://togithub.com/websockets/ws/commit/ed2b8039) to the 7.x release line ([`22a26af`](https://togithub.com/websockets/ws/commit/22a26afb)). ### [`v7.5.5`](https://togithub.com/websockets/ws/releases/tag/7.5.5) [Compare Source](https://togithub.com/websockets/ws/compare/7.5.4...7.5.5) ##### Bug fixes - Backported [`ec9377c`](https://togithub.com/websockets/ws/commit/ec9377ca) to the 7.x release line ([`0e274ac`](https://togithub.com/websockets/ws/commit/0e274acd)). ### [`v7.5.4`](https://togithub.com/websockets/ws/releases/tag/7.5.4) [Compare Source](https://togithub.com/websockets/ws/compare/7.5.3...7.5.4) ##### Bug fixes - Backported [`6a72da3`](https://togithub.com/websockets/ws/commit/6a72da3e) to the 7.x release line ([`76087fb`](https://togithub.com/websockets/ws/commit/76087fbf)). - Backported [`869c989`](https://togithub.com/websockets/ws/commit/869c9892) to the 7.x release line ([`2799793`](https://togithub.com/websockets/ws/commit/27997933)). ### [`v7.5.3`](https://togithub.com/websockets/ws/releases/tag/7.5.3) [Compare Source](https://togithub.com/websockets/ws/compare/7.5.2...7.5.3) ### Bug fixes - The `WebSocketServer` constructor now throws an error if more than one of the `noServer`, `server`, and `port` options are specefied ([`66e58d2`](https://togithub.com/websockets/ws/commit/66e58d27)). - Fixed a bug where a `'close'` event was emitted by a `WebSocketServer` before the internal HTTP/S server was actually closed ([`5a58730`](https://togithub.com/websockets/ws/commit/5a587304)). - Fixed a bug that allowed WebSocket connections to be established after `WebSocketServer.prototype.close()` was called ([`772236a`](https://togithub.com/websockets/ws/commit/772236a1)). ### [`v7.5.2`](https://togithub.com/websockets/ws/releases/tag/7.5.2) [Compare Source](https://togithub.com/websockets/ws/compare/7.5.1...7.5.2) ### Bug fixes - The opening handshake is now aborted if the client receives a `Sec-WebSocket-Extensions` header but no extension was requested or if the server indicates an extension not requested by the client ([`aca94c8`](https://togithub.com/websockets/ws/commit/aca94c86)). ### [`v7.5.1`](https://togithub.com/websockets/ws/releases/tag/7.5.1) [Compare Source](https://togithub.com/websockets/ws/compare/7.5.0...7.5.1) ### Bug fixes - Fixed an issue that prevented the connection from being closed properly if an error occurred simultaneously on both peers ([`b434b9f`](https://togithub.com/websockets/ws/commit/b434b9f1)). ### [`v7.5.0`](https://togithub.com/websockets/ws/releases/tag/7.5.0) [Compare Source](https://togithub.com/websockets/ws/compare/7.4.6...7.5.0) ### Features - Some errors now have a `code` property describing the specific type of error that has occurred ([#1901](https://togithub.com/websockets/ws/issues/1901)). ### Bug fixes - A close frame is now sent to the remote peer if an error (such as a data framing error) occurs ([`8806aa9`](https://togithub.com/websockets/ws/commit/8806aa9a)). - The close code is now always 1006 if no close frame is received, even if the connection is closed due to an error ([`8806aa9`](https://togithub.com/websockets/ws/commit/8806aa9a)). ### [`v7.4.6`](https://togithub.com/websockets/ws/releases/tag/7.4.6) [Compare Source](https://togithub.com/websockets/ws/compare/7.4.5...7.4.6) ### Bug fixes - Fixed a ReDoS vulnerability ([`00c425e`](https://togithub.com/websockets/ws/commit/00c425ec)). A specially crafted value of the `Sec-Websocket-Protocol` header could be used to significantly slow down a ws server. ```js for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) { const value = 'b' + ' '.repeat(length) + 'x'; const start = process.hrtime.bigint(); value.trim().split(/ *, */); const end = process.hrtime.bigint(); console.log('length = %d, time = %f ns', length, end - start); } ``` The vulnerability was responsibly disclosed along with a fix in private by [Robert McLaughlin](https://togithub.com/robmcl4) from University of California, Santa Barbara. In vulnerable versions of ws, the issue can be mitigated by reducing the maximum allowed length of the request headers using the [`--max-http-header-size=size`](https://nodejs.org/api/cli.html#cli_max_http_header_size_size) and/or the [`maxHeaderSize`](https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener) options. ### [`v7.4.5`](https://togithub.com/websockets/ws/releases/tag/7.4.5) [Compare Source](https://togithub.com/websockets/ws/compare/7.4.4...7.4.5) ### Bug fixes - UTF-8 validation is now done even if `utf-8-validate` is not installed ([`23ba6b2`](https://togithub.com/websockets/ws/commit/23ba6b29)). - Fixed an edge case where `websocket.close()` and `websocket.terminate()` did not close the connection ([`67e25ff`](https://togithub.com/websockets/ws/commit/67e25ff5)). ### [`v7.4.4`](https://togithub.com/websockets/ws/releases/tag/7.4.4) [Compare Source](https://togithub.com/websockets/ws/compare/7.4.3...7.4.4) ### Bug fixes - Fixed a bug that could cause the process to crash when using the permessage-deflate extension ([`9277437`](https://togithub.com/websockets/ws/commit/92774377)). ### [`v7.4.3`](https://togithub.com/websockets/ws/releases/tag/7.4.3) [Compare Source](https://togithub.com/websockets/ws/compare/7.4.2...7.4.3) ### Bug fixes - The deflate/inflate stream is now reset instead of reinitialized when context takeover is disabled ([#1840](https://togithub.com/websockets/ws/issues/1840)). ### [`v7.4.2`](https://togithub.com/websockets/ws/releases/tag/7.4.2) [Compare Source](https://togithub.com/websockets/ws/compare/7.4.1...7.4.2) ### Bug fixes - Silenced a deprecation warning ([`a2c0d44`](https://togithub.com/websockets/ws/commit/a2c0d447)). ### [`v7.4.1`](https://togithub.com/websockets/ws/releases/tag/7.4.1) [Compare Source](https://togithub.com/websockets/ws/compare/7.4.0...7.4.1) ### Bug fixes - Added a workaround for a double `'error'` event bug in Node.js < 13 which caused an uncaught error during the WebSocket handshake ([`38d6ab3`](https://togithub.com/websockets/ws/commit/38d6ab3b)). ### [`v7.4.0`](https://togithub.com/websockets/ws/releases/tag/7.4.0) [Compare Source](https://togithub.com/websockets/ws/compare/7.3.1...7.4.0) ### Features - The callback of `WebSocketServer.prototype.handleUpgrade()` now takes the client HTTP GET request as second argument ([`7d39f19`](https://togithub.com/websockets/ws/commit/7d39f19e)). ### Bug fixes - Read-only properties are now read-only ([`eabed8f`](https://togithub.com/websockets/ws/commit/eabed8fc)). - The `CONNECTING`, `OPEN`, `CLOSING`, `CLOSED`, `binaryType`, `bufferedAmount`, `extensions`, `onclose`, `onerror`, `onmessage`, `onopen`, `protocol`, `readyState`, and `url` properties are now enumerable ([`2069e68`](https://togithub.com/websockets/ws/commit/2069e684)). ### [`v7.3.1`](https://togithub.com/websockets/ws/releases/tag/7.3.1) [Compare Source](https://togithub.com/websockets/ws/compare/7.3.0...7.3.1) ### Bug fixes - Improved `websocket.bufferedAmount` accuracy ([`e1349c0`](https://togithub.com/websockets/ws/commit/e1349c04), [`a162942`](https://togithub.com/websockets/ws/commit/a1629426)). ### [`v7.3.0`](https://togithub.com/websockets/ws/releases/tag/7.3.0) [Compare Source](https://togithub.com/websockets/ws/compare/7.2.5...7.3.0) ### Features - `WebSocket.prototype.addEventListener()` now supports the `once` option ([#1754](https://togithub.com/websockets/ws/issues/1754)). ### [`v7.2.5`](https://togithub.com/websockets/ws/releases/tag/7.2.5) [Compare Source](https://togithub.com/websockets/ws/compare/7.2.3...7.2.5) ### Bug fixes - Fixed compatibility with Node.js master ([`651d662`](https://togithub.com/websockets/ws/commit/651d6627)). ### [`v7.2.3`](https://togithub.com/websockets/ws/releases/tag/7.2.3) [Compare Source](https://togithub.com/websockets/ws/compare/7.2.2...7.2.3) ### Bug fixes - `WebSocket#{p{i,o}ng,close}()` now thow an error if the data to send is too large to fit in a control frame ([`e54f08d`](https://togithub.com/websockets/ws/commit/e54f08da)). ### [`v7.2.2`](https://togithub.com/websockets/ws/releases/tag/7.2.2) [Compare Source](https://togithub.com/websockets/ws/compare/7.2.1...7.2.2) ### Bug fixes - Fixed an issue where calling `webSocketStream.end()` could cause the process to crash ([`9535702`](https://togithub.com/websockets/ws/commit/9535702e)). - The connection is now closed if a non-masked frame is received on the server or a masked frame is received on the client ([#1681](https://togithub.com/websockets/ws/issues/1681)). - The status code 1014 is now allowed to be used ([#1682](https://togithub.com/websockets/ws/issues/1682)). ### [`v7.2.1`](https://togithub.com/websockets/ws/releases/tag/7.2.1) [Compare Source](https://togithub.com/websockets/ws/compare/7.2.0...7.2.1) ### Bug fixes - Added `bufferutil` and `utf-8-validate` as peer dependencies ([#1626](https://togithub.com/websockets/ws/issues/1626)). ### [`v7.2.0`](https://togithub.com/websockets/ws/releases/tag/7.2.0) [Compare Source](https://togithub.com/websockets/ws/compare/7.1.2...7.2.0) ### Features - Added ability to specify the `readableObjectMode` option when using `WebSocket.createWebSocketStream()` ([#1647](https://togithub.com/websockets/ws/issues/1647)).Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.