add 500MB limit in WPD

pull/116/head
Aevann 2023-02-08 18:54:11 +02:00
parent cb62c760a8
commit b79172a1a2
1 changed files with 2 additions and 0 deletions

View File

@ -523,6 +523,8 @@ def is_repost():
@limiter.limit(POST_RATE_LIMIT, key_func=get_ID)
@auth_required
def submit_post(v:User, sub=None):
if request.content_length > 500 * 1024 * 1024:
return {"error": "Max file size is 500 MB."}, 413
url = request.values.get("url", "").strip()