Ensure request JSON contains an object

This commit is contained in:
ShadowNinja
2014-07-02 22:16:04 -04:00
parent cf3b5d79dc
commit 9a75f8e38e

View File

@@ -52,6 +52,9 @@ def announce():
except:
return "Unable to process JSON data.", 400
if type(server) != dict:
return "JSON data is not an object.", 400
if not "action" in server:
return "Missing action field.", 400