Skip to content
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

Crow does not accept 0 MASK bit in websockets #43

Closed
The-EDev opened this issue Nov 2, 2020 · 1 comment · Fixed by #44
Closed

Crow does not accept 0 MASK bit in websockets #43

The-EDev opened this issue Nov 2, 2020 · 1 comment · Fixed by #44
Assignees
Labels
bug Something isn't working
Milestone

Comments

@The-EDev
Copy link
Member

The-EDev commented Nov 2, 2020

Crow does not check the mask bit, instead it applies the mask regardless (since the mask is always 0 if the mask bit is not set), but this would still involve memory allocation, asio reading, and a loop containing XOR and MOD operations.

a better implementation would be to check the mask bit and ignore any operation if the bit isn't set.

@The-EDev The-EDev added the bug Something isn't working label Nov 2, 2020
@The-EDev The-EDev added this to the 0.3 milestone Nov 2, 2020
@The-EDev The-EDev self-assigned this Nov 2, 2020
@The-EDev
Copy link
Member Author

The-EDev commented Nov 4, 2020

Update: I was incorrect, crow just shuts the connection if the message is not masked. I'm almost sure this isn't how it should work, especially if we're using SSL

@The-EDev The-EDev changed the title Crow does not check for MASK bit in websockets Crow does not accept 0 MASK bit in websockets Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant