From 1390b1c627b59c3b15aa6b57ff71021792b2bb65 Mon Sep 17 00:00:00 2001 From: "Chinmay D. Pai" Date: Thu, 2 Jul 2020 17:43:32 +0530 Subject: [PATCH 1/4] fix: limit commenting to logged in accounts * do not allow users not logged in to comment * add an hourly limit of 20 comments per user * add better checks for urls and email Signed-off-by: Chinmay D. Pai --- .../templates/includes/comments/comments.html | 70 +++++++------------ .../templates/includes/comments/comments.py | 55 +++++++++------ frappe/website/doctype/web_form/web_form.py | 6 +- 3 files changed, 61 insertions(+), 70 deletions(-) diff --git a/frappe/templates/includes/comments/comments.html b/frappe/templates/includes/comments/comments.html index ef53effe53..87241ed075 100644 --- a/frappe/templates/includes/comments/comments.html +++ b/frappe/templates/includes/comments/comments.html @@ -9,10 +9,10 @@ {% endif %}
- {% for comment in comment_list %} -
- {% include "templates/includes/comments/comment.html" %} -
+ {% for comment in comment_list %} +
+ {% include "templates/includes/comments/comment.html" %} +
{% endfor %}
@@ -25,26 +25,22 @@
{{ _("Add Comment") }} -