Skip to content

Allow to provide a maximum frame length#140

Open
mebsout wants to merge 3 commits into
vbmithr:masterfrom
mebsout:max-frame-length
Open

Allow to provide a maximum frame length#140
mebsout wants to merge 3 commits into
vbmithr:masterfrom
mebsout:max-frame-length

Conversation

@mebsout

@mebsout mebsout commented Jan 20, 2025

Copy link
Copy Markdown
Contributor

This MR allows to provide a maximum frame length when starting a server. There is no maximum by default.

When a frame whose size is above this limit is received, the connection is closed (with the dedicated code 1009, see https://datatracker.ietf.org/doc/html/rfc6455#section-7.4.1).

While this check can be performed on the application side, doing it in the library allows to avoid being attacked by not even reading the frame and allocating memory.

@copy

copy commented Jul 4, 2025

Copy link
Copy Markdown
Collaborator

This sounds useful, could you rebase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants