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

Packet Validation #21

Open
Z-Kris opened this issue Aug 28, 2024 · 0 comments
Open

Packet Validation #21

Z-Kris opened this issue Aug 28, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Z-Kris
Copy link
Contributor

Z-Kris commented Aug 28, 2024

We need to add packet validation to RSProt to ensure that servers cannot cause clients to crash by sending corrupt game packets. This validation should support opting out of it.
This validation would include things like:

  • Ensuring packet inputs don't result in the packet size from exceeding the defined packet capacity (for var-byte and var-short packets)
  • Ensuring encoded packet size is equal to the constant size (for constant size packets specifically)
  • Ensuring any interface packets will not result in a crash due to a missing component in the cache. We can cross-reference this against the JS5-provided master index file, or alternative, allowing servers to define their own validator.

The end goal of this is to throw errors early on-spot, as this makes it easier for developers to figure out the problematic spots in their codebase. If the error is left up to the client, or the packet encoder, the stacktrace is lost as far as "where did this actually stem from" goes, which makes figuring these cases out harder.

@Z-Kris Z-Kris added the enhancement New feature or request label Aug 28, 2024
@Z-Kris Z-Kris self-assigned this Aug 28, 2024
@blurite blurite deleted a comment Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant