image uploads -> file uploads
parent
5e27e8daeb
commit
adc545769b
|
@ -87,7 +87,7 @@ def submit_emoji(v):
|
|||
abort(400, 'The name of this emoji should start with the word "marseyflag"')
|
||||
|
||||
if g.is_tor:
|
||||
abort(400, "Image uploads are not allowed through TOR!")
|
||||
abort(400, "File uploads are not allowed through TOR!")
|
||||
|
||||
if not file or not file.content_type.startswith('image/'):
|
||||
abort(400, "You need to submit an image!")
|
||||
|
@ -348,7 +348,7 @@ def submit_hat(v):
|
|||
username = request.values.get('author', '').strip()
|
||||
|
||||
if g.is_tor:
|
||||
abort(400, "Image uploads are not allowed through TOR!")
|
||||
abort(400, "File uploads are not allowed through TOR!")
|
||||
|
||||
file = request.files["image"]
|
||||
if not file or not file.content_type.startswith('image/'):
|
||||
|
@ -536,7 +536,7 @@ def update_emoji(v):
|
|||
|
||||
if file:
|
||||
if g.is_tor:
|
||||
abort(400, "Image uploads are not allowed through TOR!")
|
||||
abort(400, "File uploads are not allowed through TOR!")
|
||||
if not file.content_type.startswith('image/'):
|
||||
abort(400, "You need to submit an image!")
|
||||
|
||||
|
@ -647,7 +647,7 @@ def update_hat(v):
|
|||
|
||||
if file:
|
||||
if g.is_tor:
|
||||
abort(400, "Image uploads are not allowed through TOR!")
|
||||
abort(400, "File uploads are not allowed through TOR!")
|
||||
if not file.content_type.startswith('image/'):
|
||||
abort(400, "You need to submit an image!")
|
||||
|
||||
|
|
|
@ -543,7 +543,7 @@ def get_hole_css(hole):
|
|||
@limiter.limit("50/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def upload_hole_sidebar(v, hole):
|
||||
if g.is_tor: abort(403, "Image uploads are not allowed through Tor")
|
||||
if g.is_tor: abort(403, "File uploads are not allowed through TOR")
|
||||
|
||||
hole = get_hole(hole)
|
||||
if not v.mods_hole(hole.name): abort(403)
|
||||
|
@ -631,7 +631,7 @@ def delete_all_hole_sidebars(v, hole):
|
|||
@limiter.limit("50/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def upload_hole_banner(v, hole):
|
||||
if g.is_tor: abort(403, "Image uploads are not allowed through Tor")
|
||||
if g.is_tor: abort(403, "File uploads are not allowed through TOR")
|
||||
|
||||
hole = get_hole(hole)
|
||||
if not v.mods_hole(hole.name): abort(403)
|
||||
|
@ -719,7 +719,7 @@ def delete_all_hole_banners(v, hole):
|
|||
@limiter.limit("5/minute;50/day", deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def hole_marsey(v, hole):
|
||||
if g.is_tor: abort(403, "Image uploads are not allowed through TOR!")
|
||||
if g.is_tor: abort(403, "File uploads are not allowed through TOR!")
|
||||
|
||||
hole = get_hole(hole)
|
||||
if not v.mods_hole(hole.name): abort(403)
|
||||
|
|
|
@ -60,7 +60,7 @@ def remove_background(v):
|
|||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def upload_custom_background(v):
|
||||
if g.is_tor: abort(403, "Image uploads are not allowed through TOR!")
|
||||
if g.is_tor: abort(403, "File uploads are not allowed through TOR!")
|
||||
|
||||
if not v.patron:
|
||||
abort(403, f"Custom site backgrounds are only available to {patron}s!")
|
||||
|
@ -586,7 +586,7 @@ def settings_log_out_others(v):
|
|||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def settings_images_profile(v):
|
||||
if g.is_tor: abort(403, "Image uploads are not allowed through TOR!")
|
||||
if g.is_tor: abort(403, "File uploads are not allowed through TOR!")
|
||||
|
||||
file = request.files["profile"]
|
||||
|
||||
|
@ -629,7 +629,7 @@ def settings_images_profile(v):
|
|||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def settings_images_banner(v):
|
||||
if g.is_tor: abort(403, "Image uploads are not allowed through TOR!")
|
||||
if g.is_tor: abort(403, "File uploads are not allowed through TOR!")
|
||||
|
||||
file = request.files["banner"]
|
||||
|
||||
|
@ -653,7 +653,7 @@ def settings_images_banner(v):
|
|||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def settings_images_profile_background(v):
|
||||
if g.is_tor: abort(403, "Image uploads are not allowed through TOR!")
|
||||
if g.is_tor: abort(403, "File uploads are not allowed through TOR!")
|
||||
|
||||
file = request.files["profile_background"]
|
||||
|
||||
|
|
Loading…
Reference in New Issue