From c577802e63de76b0dbf1dee33a727106d3af4519 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Sun, 5 Jan 2025 15:21:28 +0100 Subject: [PATCH] fi: limit title and body length --- client/dispatch-query.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/dispatch-query.py b/client/dispatch-query.py index a38d5a3..78b625d 100755 --- a/client/dispatch-query.py +++ b/client/dispatch-query.py @@ -57,6 +57,10 @@ def ntfy_api_get_topic(ntfy_api_server, ntfy_api_token, username): def ntfy_send(dispatch_uuid, user_topic, title, message, ntfy_push_target, ntfy_user, ntfy_pass): '''Send message via NTFY topic''' + # limit message length and title # + message = message[:1024] + title = title[:512] + if not user_topic: report_failed_dispatch(dispatch_uuid, "No user topic") return