From ced72f4a89d202a2deee1a4d64f53fcfb3a72995 Mon Sep 17 00:00:00 2001 From: Alexey Shchepin Date: Tue, 25 Mar 2025 17:42:31 +0300 Subject: [PATCH] Sanitize message ID coming from Matrix --- src/mod_matrix_gw_room.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod_matrix_gw_room.erl b/src/mod_matrix_gw_room.erl index 9ac49bf8c..002704f69 100644 --- a/src/mod_matrix_gw_room.erl +++ b/src/mod_matrix_gw_room.erl @@ -2718,7 +2718,8 @@ notify_event_xmpp( UserJID = jid:make(LUser, LServer, LResource), MsgID = case Content of - #{<<"net.process-one.xmpp-id">> := MID} -> + #{<<"net.process-one.xmpp-id">> := MID} + when is_binary(MID) -> MID; _ -> <<"">>