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

[Security] Response size limitation #282

Closed
ziaratban opened this issue Jan 6, 2022 · 2 comments
Closed

[Security] Response size limitation #282

ziaratban opened this issue Jan 6, 2022 · 2 comments
Labels

Comments

@ziaratban
Copy link

Hi

How can i limit the size of the response from the client to prevent a ddos ​​attack?

For example, after sending a client more than 100 bytes, the connection must be disconnected.

ratchetphp/Ratchet#892

@clue
Copy link
Member

clue commented Jan 6, 2022

@ziaratban Thanks for bringing this up, but it's kind of hard to give useful information with this little information. What response are we talking about and what kind of DDoS are we talking about?

If you want to close the connection, you can simply call $connection->close(). If you want to close the connection after sending some data (such as 100 bytes), you may call $connection->end($data) together with a possible time out handling logic to also call close().

I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can always reopen this 👍

@clue clue added the question label Jan 6, 2022
@clue clue closed this as completed Jan 6, 2022
@ziaratban
Copy link
Author

@clue thanks.
I thinks It's better to continue this issue in ratchetphp/Ratchet#892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants