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

Better serverside error checking #12

Open
llysdal opened this issue Mar 5, 2021 · 0 comments
Open

Better serverside error checking #12

llysdal opened this issue Mar 5, 2021 · 0 comments
Labels
improvement Something could be done a little better

Comments

@llysdal
Copy link
Member

llysdal commented Mar 5, 2021

When a chip is uploaded, it is first validated, compiled, and then executed.

The validation step is to make sure that the player doesn't send some garbage that will just waste servertime, and possibly throw a lua error. It simplifies the other steps greatly that it's known that the data is valid.

Validation right now consists of:

  1. Check that gates exist
  2. Check for out of bounds input/output
  3. Type check between gates
  4. Check that connections are valid (destination exists)
  5. Check if gate is banned

To really make this work well, some sort of automated testing should be made.
In general tests could be nice, to quickly verify that no security issues have been added with a feature, but it is a lot of effort to get started.

@llysdal llysdal added the improvement Something could be done a little better label Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Something could be done a little better
Projects
None yet
Development

No branches or pull requests

1 participant