1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Check barejid in carbons

This commit is contained in:
James Booth 2017-01-24 13:37:28 +00:00
parent 8e75437a7e
commit b712820c99

View File

@ -716,8 +716,7 @@ _handle_carbons(xmpp_stanza_t *const stanza)
Jid *my_jid = jid_create(connection_get_fulljid());
const char *const stanza_from = xmpp_stanza_get_from(stanza);
Jid *msg_jid = jid_create(stanza_from);
if (g_strcmp0(my_jid->barejid, msg_jid->barejid) != 0) {
if (g_strcmp0(my_jid->barejid, stanza_from) != 0) {
log_warning("Invalid carbon received, from: %s", stanza_from);
return TRUE;
}