dfsfsd
This commit is contained in:
parent
00b18ca1dc
commit
4dab5b9050
5 changed files with 9 additions and 9 deletions
|
@ -645,7 +645,7 @@ def admin_removed(v):
|
||||||
@admin_level_required(4)
|
@admin_level_required(4)
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def admin_image_ban(v):
|
def admin_image_ban(v):
|
||||||
if request.content_length > 16 * 1024 * 1024: abort(413)
|
if request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||||
|
|
||||||
|
|
||||||
i=request.files['file']
|
i=request.files['file']
|
||||||
|
|
|
@ -123,7 +123,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
|
||||||
@is_not_banned
|
@is_not_banned
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def api_comment(v):
|
def api_comment(v):
|
||||||
if request.content_length > 16 * 1024 * 1024: abort(413)
|
if request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||||
|
|
||||||
parent_submission = request.values.get("submission")
|
parent_submission = request.values.get("submission")
|
||||||
parent_fullname = request.values.get("parent_fullname")
|
parent_fullname = request.values.get("parent_fullname")
|
||||||
|
@ -586,7 +586,7 @@ def api_comment(v):
|
||||||
@auth_required
|
@auth_required
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def edit_comment(cid, v):
|
def edit_comment(cid, v):
|
||||||
if request.content_length > 16 * 1024 * 1024: abort(413)
|
if request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||||
|
|
||||||
c = get_comment(cid, v=v)
|
c = get_comment(cid, v=v)
|
||||||
|
|
||||||
|
|
|
@ -527,7 +527,7 @@ def thumbnail_thread(pid):
|
||||||
@is_not_banned
|
@is_not_banned
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def submit_post(v):
|
def submit_post(v):
|
||||||
if request.content_length > 16 * 1024 * 1024: abort(413)
|
if request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||||
|
|
||||||
title = request.values.get("title", "")
|
title = request.values.get("title", "")
|
||||||
url = request.values.get("url", "")
|
url = request.values.get("url", "")
|
||||||
|
|
|
@ -41,7 +41,7 @@ def removebackground(v):
|
||||||
@auth_required
|
@auth_required
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def settings_profile_post(v):
|
def settings_profile_post(v):
|
||||||
if request.content_length > 16 * 1024 * 1024: abort(413)
|
if request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||||
|
|
||||||
updated = False
|
updated = False
|
||||||
|
|
||||||
|
@ -500,7 +500,7 @@ def settings_log_out_others(v):
|
||||||
@auth_required
|
@auth_required
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def settings_images_profile(v):
|
def settings_images_profile(v):
|
||||||
if request.content_length > 16 * 1024 * 1024: abort(413)
|
if request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||||
|
|
||||||
if request.headers.get("cf-ipcountry") == "T1": return "Image uploads are not allowed through TOR.", 403
|
if request.headers.get("cf-ipcountry") == "T1": return "Image uploads are not allowed through TOR.", 403
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@ def settings_images_profile(v):
|
||||||
@auth_required
|
@auth_required
|
||||||
@validate_formkey
|
@validate_formkey
|
||||||
def settings_images_banner(v):
|
def settings_images_banner(v):
|
||||||
if request.content_length > 16 * 1024 * 1024: abort(413)
|
if request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||||
|
|
||||||
if request.headers.get("cf-ipcountry") == "T1": return "Image uploads are not allowed through TOR.", 403
|
if request.headers.get("cf-ipcountry") == "T1": return "Image uploads are not allowed through TOR.", 403
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-small-extra text-muted mt-3">JPG, PNG, GIF files are supported. Max file size is 16 MB.</div>
|
<div class="text-small-extra text-muted mt-3">JPG, PNG, GIF files are supported. Max file size is 4 MB.</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-small-extra text-muted mt-3">JPG, PNG, GIF files are supported. Max file size is 16 MB.</div>
|
<div class="text-small-extra text-muted mt-3">JPG, PNG, GIF files are supported. Max file size is 4 MB.</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue