From ef840c4afda79b796aed433a428c8544d60f5cde Mon Sep 17 00:00:00 2001 From: justcool393 Date: Sat, 15 Oct 2022 10:12:55 -0700 Subject: [PATCH] make it so you can't vote on messages --- files/routes/votes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/files/routes/votes.py b/files/routes/votes.py index 282d1bf6eb..8b6fce6405 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -52,6 +52,7 @@ def vote_post_comment(target_id, new, v, cls, vote_cls): target = get_post(target_id) elif cls == Comment: target = get_comment(target_id) + if not target.post: abort(404) else: abort(404)