From 63c16a867a289d791e8ca9f55cbf211db00818e8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 9 Jun 2022 18:10:25 +0200 Subject: [PATCH] make the ratelimit for editing much lower to cut down on mass overwriting --- files/routes/comments.py | 4 ++-- files/routes/posts.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 843311b029..e4fcc941d8 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -679,8 +679,8 @@ def api_comment(v): @app.post("/edit_comment/") -@limiter.limit("1/second;30/minute;200/hour;1000/day") -@limiter.limit("1/second;30/minute;200/hour;1000/day", key_func=lambda:f'{request.host}-{session.get("lo_user")}') +@limiter.limit("1/second;10/minute;20/hour;50/day") +@limiter.limit("1/second;10/minute;20/hour;50/day", key_func=lambda:f'{request.host}-{session.get("lo_user")}') @auth_required def edit_comment(cid, v): diff --git a/files/routes/posts.py b/files/routes/posts.py index 8172f0ae95..17c38719c1 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -424,8 +424,8 @@ def morecomments(v, cid): return render_template("comments.html", v=v, comments=comments, p=p, render_replies=True, ajax=True) @app.post("/edit_post/") -@limiter.limit("1/second;30/minute;200/hour;1000/day") -@limiter.limit("1/second;30/minute;200/hour;1000/day", key_func=lambda:f'{request.host}-{session.get("lo_user")}') +@limiter.limit("1/second;10/minute;20/hour;50/day") +@limiter.limit("1/second;10/minute;20/hour;50/day", key_func=lambda:f'{request.host}-{session.get("lo_user")}') @auth_required def edit_post(pid, v): p = get_post(pid)