From 71ce22b0268fe61be24380d6646b8167619771e7 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 27 Feb 2023 21:10:53 +0200 Subject: [PATCH] fix shadow leak --- files/templates/comments.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/files/templates/comments.html b/files/templates/comments.html index 96cb3b0fdb..e58252a779 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -13,6 +13,8 @@ {% macro single_comment(c, level=1, collapse=False) %} +{% if user_can_see(v, c) %} + {% set ups=c.upvotes %} {% set downs=c.downvotes %} {% set score=ups-downs %} @@ -706,9 +708,12 @@ {% endif %} {% endif %} + +{% endif %} + {% endmacro %} -{% for comment in comments if user_can_see(v, comment) %} +{% for comment in comments %} {{single_comment(comment)}} {% endfor %}