Skip to content

Allow to provide a maximum frame length #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mebsout
Copy link
Contributor

@mebsout mebsout commented Jan 20, 2025

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.

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.

1 participant