sfd
This commit is contained in:
parent
709a7fc4b5
commit
347684926b
7 changed files with 7 additions and 44 deletions
|
@ -40,11 +40,6 @@ def removebackground(v):
|
|||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||
@auth_required
|
||||
def settings_profile_post(v):
|
||||
if v and v.patron:
|
||||
if request.content_length > 16 * 1024 * 1024: return {"error":"Max file size is 8 MB (16 MB for paypigs)."}, 413
|
||||
elif request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB (16 MB for paypigs)."}, 413
|
||||
|
||||
|
||||
updated = False
|
||||
|
||||
if request.values.get("background", v.background) != v.background:
|
||||
|
@ -544,10 +539,6 @@ def settings_log_out_others(v):
|
|||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||
@auth_required
|
||||
def settings_images_profile(v):
|
||||
if v and v.patron:
|
||||
if request.content_length > 16 * 1024 * 1024: return {"error":"Max file size is 8 MB (16 MB for paypigs)."}, 413
|
||||
elif request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB (16 MB for paypigs)."}, 413
|
||||
|
||||
if request.headers.get("cf-ipcountry") == "T1": return {"error":"Image uploads are not allowed through TOR."}, 403
|
||||
|
||||
file = request.files["profile"]
|
||||
|
@ -583,10 +574,6 @@ def settings_images_profile(v):
|
|||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||
@auth_required
|
||||
def settings_images_banner(v):
|
||||
if v and v.patron:
|
||||
if request.content_length > 16 * 1024 * 1024: return {"error":"Max file size is 8 MB (16 MB for paypigs)."}, 413
|
||||
elif request.content_length > 8 * 1024 * 1024: return {"error":"Max file size is 8 MB (16 MB for paypigs)."}, 413
|
||||
|
||||
if request.headers.get("cf-ipcountry") == "T1": return {"error":"Image uploads are not allowed through TOR."}, 403
|
||||
|
||||
file = request.files["banner"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue