From 1608b3168ac60275719c0d05454618005336def1 Mon Sep 17 00:00:00 2001 From: justcool393 Date: Sat, 12 Nov 2022 04:28:56 -0600 Subject: [PATCH] awards: don't allow users to award messages --- files/routes/awards.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/files/routes/awards.py b/files/routes/awards.py index a1bb5ae8a..4dd8c42e8 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -125,8 +125,11 @@ def buy(v, award): @is_not_permabanned @feature_required('AWARDS') def award_thing(v, thing_type, id): - if thing_type == 'post': thing = get_post(id) - else: thing = get_comment(id) + if thing_type == 'post': + thing = get_post(id) + else: + thing = get_comment(id) + if not thing.parent_submission: abort(404) # don't let users award messages if v.shadowbanned: abort(500)