gfgffg
This commit is contained in:
parent
a0ca03fc0c
commit
e5370d4017
3 changed files with 6 additions and 7 deletions
|
@ -312,7 +312,7 @@ def api_comment(v):
|
|||
)
|
||||
g.db.add(c)
|
||||
g.db.flush()
|
||||
if request.files.get("file"):
|
||||
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
|
||||
file=request.files["file"]
|
||||
if not file.content_type.startswith('image/'):
|
||||
return jsonify({"error": "That wasn't an image!"}), 400
|
||||
|
@ -660,7 +660,7 @@ def edit_comment(cid, v):
|
|||
g.db.commit()
|
||||
return {"error": "Too much spam!"}, 403
|
||||
|
||||
if request.files.get("file"):
|
||||
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
|
||||
file=request.files["file"]
|
||||
if not file.content_type.startswith('image/'): return {"error": "That wasn't an image!"}, 400
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue