From 3b2dfabd3ac9fe8406569792b9a430b786468ac0 Mon Sep 17 00:00:00 2001 From: Nils G <nils.gondermann@ruhr-uni-bochum.de> Date: Thu, 30 Apr 2020 14:38:32 +0200 Subject: [PATCH] Correctly check the definition for length field --- controllers/player.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/player.py b/controllers/player.py index 329b249..44649b0 100644 --- a/controllers/player.py +++ b/controllers/player.py @@ -96,7 +96,7 @@ def submit(): if (not isinstance(inputs[key], str)) or (keytest != key): return(FAIL(CODE_MISSING)) - if input_definitions[key]["length"] and len(inputs[key]) > input_definitions[key]["length"]: + if "length" in input_definitions[key] and len(inputs[key]) > input_definitions[key]["length"]: return(FAIL(CODE_MISSING)) inputs[key] = ''.join(c for c in inputs[key] if (c.isalnum() or c == " ")) -- GitLab