Closed GuillaumeMilan closed 6 years ago
While I agree that this is a bug and we should not accept invalid JSON there, I cannot reproduce the error. Regardless what garbage I enter in the extension field, the UI still let's me modify it later.
Is this reproducible on your side? What's the error, did the page stop rendering?
I just reproduced it on my modified server. But normally it's possible on normal server as I didn't modified this part.
The information I gave to create the bug is
BUG
BUG
.sql
Thanks, I was on the wrong branch...
Data should now be rejected if it's not a valid JSON array with at least one element.
When you write bad data in the database (for example put a bad json format in the extension file in the declaration of a language), the language page becomes unmodifiable. And the only way to correct the language I found is to modify in the database manually.
To create the bug:
domjudge/jury/languages.php
create a language and put in the extensions field a non array data type like:.ext
Domjudge in this case create the language in the database even if the extension format is not json.