Verify full (and not bare) JID of the Jingle sender, since everyone in the MUC has the same bare JID.

This commit is contained in:
Boris Grozev 2015-07-22 16:58:16 -05:00
parent f8b7d048b0
commit 79ac1e800f
1 changed files with 1 additions and 2 deletions

View File

@ -88,9 +88,8 @@ module.exports = function(XMPP, eventEmitter)
this.connection.send(ack);
return true;
}
// compare from to sess.peerjid (bare jid comparison for later compat with message-mode)
// local jid is not checked
if (Strophe.getBareJidFromJid(fromJid) != Strophe.getBareJidFromJid(sess.peerjid)) {
if (fromJid != sess.peerjid) {
console.warn('jid mismatch for session id', sid, fromJid, sess.peerjid);
ack.type = 'error';
ack.c('error', {type: 'cancel'})