Skip to content

[pull] master from websockets:master - #141

Open
pull[bot] wants to merge 327 commits into
stackriot:masterfrom
websockets:master
Open

[pull] master from websockets:master#141
pull[bot] wants to merge 327 commits into
stackriot:masterfrom
websockets:master

Conversation

@pull

@pull pull Bot commented Oct 22, 2020

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull Bot added ⤵️ pull merge-conflict Resolve conflicts manually labels Oct 22, 2020
@lpinca
lpinca force-pushed the master branch 2 times, most recently from 13c5925 to 3d5066a Compare November 8, 2020 08:25
@lpinca
lpinca force-pushed the master branch 3 times, most recently from f77215b to 114de9e Compare March 7, 2021 16:50
@lpinca
lpinca force-pushed the master branch 2 times, most recently from 431cc3e to aca94c8 Compare July 3, 2021 08:15
@lpinca
lpinca force-pushed the master branch 2 times, most recently from 106cf84 to c4394c3 Compare July 20, 2021 11:33
lpinca added 5 commits July 29, 2021 07:11
Prevent the `onclose`, `onerror`, `onmessage`, and `onopen` getters and
setters from returning or removing event listeners added with
`WebSocket.prototype.addEventListener()`.

Also prevent `WebSocket.prototype.removeEventListener()` from removing
event listeners added with the `onclose`, `onerror`, `onmessage`, and
`onopen` setters.

Refs: #1818
Make the `onclose`, `onerror`, `onmessage`, and `onopen` getters return
`null` instead of `undefined` if the event handler is not set.
- Remove non-standard `OpenEvent` class.
- Make properties read-only.
- Update constructor signatures to match the ones defined by the HTML
  standard.
lpinca added 2 commits August 6, 2021 18:49
Use the chunk returned by `socket.read()` to handle the buffered data
instead of relying on a `'data'` event emitted after the `'close'`
event.

Refs: nodejs/node#39639
Use the correct error message if the server sends an empty subprotocol
name.
@lpinca
lpinca force-pushed the master branch 2 times, most recently from 856b19d to 26a46f3 Compare August 11, 2021 15:26
lpinca added 7 commits March 21, 2026 18:12
When the `reason` argument for `websocket.close()` is a `TypedArray`
instead of a string or `Buffer`, the function does not correctly
overwrite the dirty buffer allocated via `Buffer.allocUnsafe()`. This
results in the disclosure of uninitialized memory, potentially leaking
sensitive data to the remote peer.

Add stricter validation for the argument type.
Previously, the receiver could retain one `Buffer` entry per buffered
chunk or message fragment until enough data was parsed or the message
completed. A peer could use many tiny fragments/chunks and make retained
memory scale with retained part count rather than message payload size.

Add configurable `maxBufferedChunks` and `maxFragments` options to bound
the number of retained parts. When either limit is exceeded, emit
a `WS_ERR_TOO_MANY_BUFFERED_PARTS` error and close the connection with
close code 1008.

Signed-off-by: Nadav0077 <18245584+Nadav0077@users.noreply.github.com>
Ensure that empty fragments are counted against the `maxFragments`
limit.
lpinca added 2 commits July 4, 2026 19:05
Use smaller and safer default values for the `maxBufferedChunks` and
`maxFragments` options.

Closes #2331
Closes #2332
lpinca and others added 8 commits July 14, 2026 18:31
In Node.js versions >= 22.23.2 < 23.0.0, >= 24.18.1 < 25.0.0, and
>= 26.5.1, the HTTP server rejects the request before emitting the
`'upgrade'` event.

Refs: nodejs/node@064d339f
Direct security reporters to use private vulnerability reporting on
GitHub as the primary reporting channel.
When a server is configured with `clientMaxWindowBits = N` and a client
offers `client_max_window_bits = M` where `M < N`, the server must not
respond with a value greater than `M`.

Previously the server accepted such offers and responded with
`client_max_window_bits = N`. The analogous check for
`serverMaxWindowBits` already existed; this commit adds the symmetric
check for `clientMaxWindowBits`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.