Bad action increment on invalid file update request
This commit is contained in:
parent
38d330da1a
commit
277d16eabb
1 changed files with 2 additions and 0 deletions
|
@ -92,10 +92,12 @@ class FileRequest(object):
|
|||
site = self.sites.get(params["site"])
|
||||
if not site or not site.settings["serving"]: # Site unknown or not serving
|
||||
self.response({"error": "Unknown site"})
|
||||
self.connection.badAction(1)
|
||||
return False
|
||||
|
||||
if not params["inner_path"].endswith("content.json"):
|
||||
self.response({"error": "Only content.json update allowed"})
|
||||
self.connection.badAction(5)
|
||||
return
|
||||
|
||||
content = json.loads(params["body"])
|
||||
|
|
Loading…
Reference in a new issue