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

Simple validation for ScoreType when submitting scores #324

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

jvyden
Copy link
Member

@jvyden jvyden commented Jan 2, 2024

Closes #142

Why

Currently, Refresh does not validate the ScoreType (aka the game mode or player count) when submitting scores. This isn't too big of a deal since the game only checks certain score types, but it's quite trivial to protect against so we might as well.

How

To do this, we simply validate whether the score type is either between 1-4 players in co-op mode or 7 for versus mode.

Remarks

We could do some further validation, checking the level's version and type but I think this is enough to stop most abuse.

@jvyden jvyden requested a review from Beyley January 2, 2024 23:17
@jvyden jvyden merged commit 6e847d4 into LittleBigRefresh:main Jan 2, 2024
2 checks passed
@jvyden jvyden deleted the validate-scoretype-submission branch January 2, 2024 23:21
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.

Server not validating 'type' in /scoreboard/user/
2 participants