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

Ensure pong response recipient port is a uint16 #156

Merged
merged 4 commits into from
Oct 26, 2022

Conversation

jtraglia
Copy link
Contributor

PR Description

According to the spec, recipient-port is a (unsigned) 16-bit integer. But the implementation of PongMessage allowed any 32-bit integer to be used. I've added checks (isPortValid from Teku) to ensure its compliance.

We could add checks to the constructor, but I don't think that's necessary. Maybe in a different PR.

Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM.

@ajsutton ajsutton merged commit 86e4b7d into Consensys:master Oct 26, 2022
@jtraglia jtraglia deleted the pong-port-check branch October 26, 2022 21:00
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.

2 participants