From 4b235fc86bc1cb7530dce7aa2809b10cc43b43f9 Mon Sep 17 00:00:00 2001 From: Goffi Date: Tue, 21 Jul 2026 19:11:17 +0200 Subject: [PATCH] core (xmpp): Prevent non printable message to be displayed: We now use `client.is_message_printable` to check if message is printable. If it's not, we block storage in DB and sending to bridge. The previous code could let message pass if metadata were stored in `extra`. --- libervia/backend/core/xmpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libervia/backend/core/xmpp.py b/libervia/backend/core/xmpp.py index dc84cfd2..20a38578 100644 --- a/libervia/backend/core/xmpp.py +++ b/libervia/backend/core/xmpp.py @@ -1840,7 +1840,7 @@ class SatMessageProtocol(xmppim.MessageProtocol): await post_treat self.complete_attachments(data) - if not data["message"] and not data["extra"] and not data["subject"]: + if not client.is_message_printable(data): raise exceptions.CancelError("Cancelled empty message") if not client.is_component or client.receiveHistory: await self.add_to_history(data)