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`.
This commit is contained in:
parent
b384c6bb8f
commit
4b235fc86b
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue