From c1268d396b11a776bb6c07a82a1663d30a8b785e Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 24 Jan 2023 12:23:19 +0200 Subject: [PATCH] make it not possible to sticky removed comments --- files/routes/admin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/routes/admin.py b/files/routes/admin.py index aa37f829b..8fec7cb22 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1446,6 +1446,9 @@ def unsticky_post(post_id, v): @admin_level_required(PERMS['POST_COMMENT_MODERATION']) def sticky_comment(cid, v): comment = get_comment(cid, v=v) + if comment.is_banned: + abort(403, "Can't sticky removed comments!") + if not comment.stickied: comment.stickied = v.username