Skip to content

Better serverside error checking #12

@llysdal

Description

@llysdal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementSomething could be done a little better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions