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

validate MaxMessageSize in blockwise and tcp session #42

Merged
merged 2 commits into from
Mar 26, 2019

Conversation

arun1587
Copy link
Collaborator

  • added ToBytesLength() and tests for MessageBase and TCPMessage
  • validate the MaxMessageSize for tcp session.

messagetcp.go Outdated Show resolved Hide resolved
message.go Outdated Show resolved Hide resolved
message.go Outdated Show resolved Hide resolved
blockwise.go Outdated Show resolved Hide resolved
blockwise.go Outdated
return nil
}

if uint32(size) > session.peerMaxMessageSize {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please extends condition about session.srv.MaxMessageSize != 0 &&

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess, here you mean to say session.peerMaxMessageSize != 0 && , no ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. 👍

server.go Outdated Show resolved Hide resolved
@jkralik jkralik merged commit 1958954 into plgd-dev:master Mar 26, 2019
@jkralik
Copy link
Member

jkralik commented Mar 26, 2019

Thx for contributing!

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