forked from MarseyWorld/MarseyWorld
bbb
parent
f90e4a272d
commit
03f752e7e6
|
@ -136,8 +136,8 @@ def api_comment(v):
|
|||
if v.is_suspended: return {"error": "You can't perform this action while banned."}, 403
|
||||
|
||||
if v and v.patron:
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}, 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}, 413
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}
|
||||
|
||||
parent_submission = request.values.get("submission").strip()
|
||||
parent_fullname = request.values.get("parent_fullname").strip()
|
||||
|
@ -537,8 +537,8 @@ def api_comment(v):
|
|||
@auth_required
|
||||
def edit_comment(cid, v):
|
||||
if v and v.patron:
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}, 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}, 413
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}
|
||||
|
||||
c = get_comment(cid, v=v)
|
||||
|
||||
|
|
|
@ -388,8 +388,8 @@ def morecomments(v, cid):
|
|||
@auth_required
|
||||
def edit_post(pid, v):
|
||||
if v and v.patron:
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}, 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}, 413
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}
|
||||
|
||||
p = get_post(pid)
|
||||
|
||||
|
@ -687,8 +687,8 @@ def submit_post(v):
|
|||
if v.is_suspended: return {"error": "You can't perform this action while banned."}, 403
|
||||
|
||||
if v and v.patron:
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error": "Max file size is 8 MB."}, 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error": "Max file size is 4 MB."}, 413
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error": "Max file size is 8 MB."}
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error": "Max file size is 4 MB."}
|
||||
|
||||
|
||||
title = request.values.get("title", "").strip()[:500].replace('','')
|
||||
|
|
|
@ -47,8 +47,8 @@ def removebackground(v):
|
|||
@auth_required
|
||||
def settings_profile_post(v):
|
||||
if v and v.patron:
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}, 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}, 413
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}
|
||||
|
||||
|
||||
updated = False
|
||||
|
@ -620,8 +620,8 @@ def settings_log_out_others(v):
|
|||
@auth_required
|
||||
def settings_images_profile(v):
|
||||
if v and v.patron:
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}, 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}, 413
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}
|
||||
|
||||
if request.headers.get("cf-ipcountry") == "T1": return {"error":"Image uploads are not allowed through TOR."}, 403
|
||||
|
||||
|
@ -655,8 +655,8 @@ def settings_images_profile(v):
|
|||
@auth_required
|
||||
def settings_images_banner(v):
|
||||
if v and v.patron:
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}, 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}, 413
|
||||
if request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB."}
|
||||
elif request.content_length > 4 * 1024 * 1024: return {"error":"Max file size is 4 MB."}
|
||||
|
||||
if request.headers.get("cf-ipcountry") == "T1": return {"error":"Image uploads are not allowed through TOR."}, 403
|
||||
|
||||
|
|
Loading…
Reference in New Issue