Mercurial > hg
comparison mcabber/mcabber/xmpp.c @ 2294:2a9569fd7644
Carbons: Add sender check
Thanks to Georg Lukas for the report.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 26 Jan 2017 22:51:20 +0100 |
parents | f181418db215 |
children | eb96666502f5 |
comparison
equal
deleted
inserted
replaced
2293:038b864b44c6 | 2294:2a9569fd7644 |
---|---|
1156 else | 1156 else |
1157 skip_process = TRUE; | 1157 skip_process = TRUE; |
1158 | 1158 |
1159 // Parse a message that is send to one of our other resources | 1159 // Parse a message that is send to one of our other resources |
1160 if (!g_strcmp0(carbon_name, "received")) { | 1160 if (!g_strcmp0(carbon_name, "received")) { |
1161 // Check envelope JID for carbon messages | |
1162 gchar *self_bjid = jidtodisp(lm_connection_get_jid(lconnection)); | |
1163 if (g_strcmp0(self_bjid, bjid)) { | |
1164 scr_LogPrint(LPRINT_LOGNORM, "Received invalid carbon copy!"); | |
1165 g_free(self_bjid); | |
1166 goto handle_messages_return; | |
1167 } | |
1168 g_free(self_bjid); | |
1169 | |
1161 from = lm_message_node_get_attribute(x, "from"); | 1170 from = lm_message_node_get_attribute(x, "from"); |
1162 if (!from) { | 1171 if (!from) { |
1163 scr_LogPrint(LPRINT_LOGNORM, "Malformed carbon copy!"); | 1172 scr_LogPrint(LPRINT_LOGNORM, "Malformed carbon copy!"); |
1164 goto handle_messages_return; | 1173 goto handle_messages_return; |
1165 } | 1174 } |