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.
coverage: 37.531% (+0.008%) from 37.523%
when pulling e06d5282058bd31dcb84d4ef54774bcff5b847f7 on BelgianSalamander:master
into 51571c52e0a91c9f91626c9618c06d7df1e8cec2 on NZOI:master.
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.