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

Display an error message when submitting executable. #268

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

BelgianSalamander
Copy link
Member

This pull request should resolve #257.

It displays an error message either when a submission's source has an invalid text encoding or the source contains a null character. Either conditions would have previously caused a 500 Internal Server Error.

  • Having an invalid text encoding caused verification to throw an error when it tried checking if the source is blank (String#blank raises an exception when called on a string with an invalid encoding). This means that this needs to be checked before running any verification.
  • If the source was valid UTF-8 but contained a null character, an error would be raised when trying to save the record because PostgreSQL does not support having null characters in strings.

@coveralls
Copy link

coveralls commented May 19, 2024

Coverage Status

coverage: 37.531% (+0.008%) from 37.523%
when pulling e06d528 on BelgianSalamander:master
into 51571c5 on NZOI:master.

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.

Produce nice error message when .exe submitted instead of source code
3 participants