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

Friend requests with very long messages are ignored #2719

Open
JFreegman opened this issue Mar 1, 2024 · 0 comments
Open

Friend requests with very long messages are ignored #2719

JFreegman opened this issue Mar 1, 2024 · 0 comments
Labels
bug Bug fix for the user, not a fix to a build script
Milestone

Comments

@JFreegman
Copy link
Member

JFreegman commented Mar 1, 2024

If you send a friend request through the onion with a message over a certain threshold but still under TOX_MAX_FRIEND_REQUEST_LENGTH, the request will succeed on the sender's side, but be dropped on the receiving side. This is because the length of the request packet is too large for the onion data packet handler.

The fix: Reduce MAX_FRIEND_REQUEST_DATA_SIZE and TOX_MAX_FRIEND_REQUEST_LENGTH so that the maximum possible packet size received by handle_data_response() is <= MAX_DATA_REQUEST_SIZE. The length check in send_friend_request_packet() also needs to be adjusted to match the new value.

The bigger fix: The onion shouldn't be able to send packets that are too large to be handled.

@JFreegman JFreegman added the bug Bug fix for the user, not a fix to a build script label Mar 1, 2024
@JFreegman JFreegman added this to the v0.2.20 milestone Mar 1, 2024
JFreegman added a commit to JFreegman/toxcore that referenced this issue Mar 2, 2024
This is a band-aid solution that prevents friend requests with
long messages from being dropped. However it doesn't solve the
underlying problem, described here:
TokTok#2719
JFreegman added a commit to JFreegman/toxcore that referenced this issue Mar 5, 2024
This is a band-aid solution that prevents friend requests with
long messages from being dropped. However it doesn't solve the
underlying problem, described here:
TokTok#2719
JFreegman added a commit to JFreegman/toxcore that referenced this issue Mar 7, 2024
This is a band-aid solution that prevents friend requests with
long messages from being dropped. However it doesn't solve the
underlying problem, described here:
TokTok#2719
JFreegman added a commit to JFreegman/toxcore that referenced this issue Mar 28, 2024
This is a band-aid solution that prevents friend requests with
long messages from being dropped. However it doesn't solve the
underlying problem, described here:
TokTok#2719
@iphydf iphydf modified the milestones: v0.2.20, v0.2.21 Nov 6, 2024
JFreegman added a commit to JFreegman/toxcore that referenced this issue Nov 9, 2024
This is a band-aid solution that prevents friend requests with
long messages from being dropped. However it doesn't solve the
underlying problem, described here:
TokTok#2719
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fix for the user, not a fix to a build script
Projects
None yet
Development

No branches or pull requests

2 participants