From 89a58c7bb601e11aab66b7c4384dc423a7523392 Mon Sep 17 00:00:00 2001 From: rebecca Date: Sat, 14 Nov 2026 20:16:01 +0000 Subject: enforce max length on edit summaries --- apioforum/templates/edit_post.html | 2 +- apioforum/thread.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apioforum/templates/edit_post.html b/apioforum/templates/edit_post.html index 573fd4e..6bae52c 100644 --- a/apioforum/templates/edit_post.html +++ b/apioforum/templates/edit_post.html @@ -10,7 +10,7 @@ {% if post.wiki == 1 %}

- +

{% endif %}

confirm edit?

diff --git a/apioforum/thread.py b/apioforum/thread.py index 4e3b326..93cb76b 100644 --- a/apioforum/thread.py +++ b/apioforum/thread.py @@ -413,6 +413,8 @@ def edit_post(post_id): err = None newcontent = request.form['newcontent'] comment = request.form['comment'] if 'comment' in request.form else "" + if len(comment)>2000: + err="edit summary is too long" if len(newcontent.strip()) == 0: err="post contents can't be empty" -- cgit v1.2.3