This commit is contained in:
Ross
2021-12-10 18:59:41 +00:00
parent cf016e6991
commit dfd3308070
2 changed files with 9 additions and 4 deletions
+3 -3
View File
@@ -265,9 +265,9 @@ def loadJsonAnswer(answer):
return False, JsonResponse({"success": False, "error": "invalid"})
# The model should catch invalid data but this should be less intensive
#max_int = 10000000
#if answer["cid"] > max_int or answer["eid"] > max_int:
# return False, JsonResponse({"success": False})
max_int = 2147483647
if answer["cid"] > max_int or answer["eid"] > max_int:
return False, JsonResponse({"success": False})
exam = get_object_or_404(Exam, pk=answer["eid"])