From fbf59bf8fda6619f93538624bee6ea6030c28810 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 20 Apr 2024 23:07:07 +0200 Subject: [PATCH] limit orgy title to 40 chars to prevent overflow --- files/routes/chats.py | 3 +++ files/templates/orgy_control.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/files/routes/chats.py b/files/routes/chats.py index a5e6c9bf8..ef839501d 100644 --- a/files/routes/chats.py +++ b/files/routes/chats.py @@ -190,6 +190,9 @@ def schedule_orgy(v, chat_id): if not title: abort(400, "A title is required!") + if len(title) > 40: + abort(400, 'Title is too long (max 40 characters)') + normalized_link = normalize_url(link) if start_utc: diff --git a/files/templates/orgy_control.html b/files/templates/orgy_control.html index af4046feb..ed86eca55 100644 --- a/files/templates/orgy_control.html +++ b/files/templates/orgy_control.html @@ -18,7 +18,7 @@
- +