Merge pull request #328 from jitsi/verify-full-jid-for-jingle

Verify full (and not bare) JID of the Jingle sender, since everyone i…
This commit is contained in:
bgrozev 2015-08-03 11:32:32 -05:00
commit 1dea41d3d4
1 changed files with 1 additions and 2 deletions

View File

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