From 98b427e3a27956ebc9d6eedf49766962d26a5aaa Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 21 Dec 2022 22:14:33 +0200 Subject: [PATCH] prevent DDOS --- files/routes/users.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/routes/users.py b/files/routes/users.py index eb23220cf..089193af4 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -208,6 +208,8 @@ def chuds(v:User): return render_template("chuds.html", v=v, users=users) def all_upvoters_downvoters(v:User, username:str, vote_dir:int, is_who_simps_hates:bool): + if username == 'Snappy': + abort(403, "For performance reasons, you can't see Snappy statistics!") vote_str = 'votes' simps_haters = 'voters' vote_name = 'Neutral'