From c78380ff35d6768a5c5c7a48c2ce978d823b33ab Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 5 Apr 2024 11:40:26 +0200 Subject: [PATCH] disallow grassing urself --- files/routes/awards.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/files/routes/awards.py b/files/routes/awards.py index 81812b4a7..29d0831f2 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -167,7 +167,10 @@ def award_thing(v, thing_type, id): AWARDS[v.house] = HOUSE_AWARDS[v.house] if kind not in AWARDS: - abort(404, "This award doesn't exist") + abort(404, "This award doesn't exist.") + + if kind == "grass" and v.id == author.id: + abort(403, "You can't grass yourself.") award_title = AWARDS[kind]['title']