From 1600b5dee7aa289fa9f64a5669a0502d4b1ada0e Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Mon, 23 Aug 2010 15:43:05 +0000 Subject: fix security check on incoming XMPP stanzas --- src/QXmppIncomingServer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/QXmppIncomingServer.cpp') diff --git a/src/QXmppIncomingServer.cpp b/src/QXmppIncomingServer.cpp index ea8702e3..5ebaa6ac 100644 --- a/src/QXmppIncomingServer.cpp +++ b/src/QXmppIncomingServer.cpp @@ -143,7 +143,10 @@ void QXmppIncomingServer::handleStanza(const QDomElement &stanza) emit dialbackRequestReceived(request); } - } else if (!d->authenticated.isEmpty() && stanza.attribute("from").split("@").last() == d->authenticated) { + } + else if (!d->authenticated.isEmpty() && + jidToDomain(stanza.attribute("from")) == d->authenticated) + { // relay packets if the remote party is authenticated bool handled = false; emit elementReceived(stanza, handled); -- cgit v1.2.3