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

feat(relay): check message data doesn't exceed a configurable limit #195

Merged
merged 7 commits into from Nov 3, 2022

Conversation

therealbytes
Copy link
Contributor

Right now, the data field of a relayed message can have an arbitrary size so it's possible for an attacker to send a giant message. This PR adds a field to the relay server configuration specifying a size limit for message data.

@therealbytes
Copy link
Contributor Author

Should I also add a flag to the configuration to set wether the size limit is enforced, like we do for signature verification and account balance? @authcall

@authcall
Copy link
Contributor

Should I also add a flag to the configuration to set wether the size limit is enforced, like we do for signature verification and account balance? @authcall

yes that sounds good. I think something like VerifyMessageSize seems reasonable so that we can use the same kind of check like if server.config.VerifyMessageSize {

authcall
authcall previously approved these changes Nov 3, 2022
@authcall authcall self-requested a review November 3, 2022 16:57
authcall
authcall previously approved these changes Nov 3, 2022
@authcall authcall self-requested a review November 3, 2022 16:59
@authcall authcall merged commit 4e35ed3 into main Nov 3, 2022
@authcall authcall deleted the therealbytes/data-size-check branch November 3, 2022 17:31
github-actions bot pushed a commit that referenced this pull request Nov 3, 2022
…igurable limit (#195)

* feat(relay): check message data doesn't exceed a configurable limit

* feat(relay): add config flag to enforce data size limit

* fix: revert typos

* fix: revert more not needed changes

* Update README.md

Co-authored-by: authcall <authcall@proton.me>
LPSCRYPT pushed a commit to LPSCRYPT/esp that referenced this pull request Jan 23, 2023
…atticexyz#195)

* feat(relay): check message data doesn't exceed a configurable limit

* feat(relay): add config flag to enforce data size limit

* fix: revert typos

* fix: revert more not needed changes

* Update README.md

Co-authored-by: authcall <authcall@proton.me>
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.

None yet

2 participants