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] Subclasses of MessageHandler implicitly accept all messages, validate method insufficient for use. #359

Closed
Gamebuster19901 opened this issue Dec 9, 2020 · 0 comments · Fixed by #368
Labels
Milestone

Comments

@Gamebuster19901
Copy link
Contributor

Describe the bug
The following method is not abstract:

protected boolean validate(final T message) {
return message != null;
}

This means that a subclass of ClientMessage will accept any message (as long as it's not null) by default if the developer forgets to implement validate.

Additionally, this method needs an address and port field to validate the client is the one who actually sent the message.

Expected behavior
Subclasses of MessageHandler should be forced to implement a validate method to ensure that the message is valid, and the message actually came from the expected client.

Your System:

  • LITIENGINE version: [e.g. 0.5.0-beta]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants