aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2013-03-09 15:16:29 +0100
committerJeremy Lainé <jeremy.laine@m4x.org>2013-03-09 15:16:29 +0100
commit05eda1dd322e338bf2931d5bf5f455af534356b1 (patch)
tree0ccb8b4aa573af2604ac99fe6f6eea9a8ecd12fe
parent5c9a346efe246c7ff225ea2dcb5ba705b69a2542 (diff)
downloadqxmpp-05eda1dd322e338bf2931d5bf5f455af534356b1.tar.gz
Disable Facebook / Google / Facebook specific mechanisms if we do not
have the corresponding credentials. Google recently changed their XMPP servers, and X-OAUTH2 is now listed before PLAIN. QXmpp was failing to connect to their servers.
-rw-r--r--CHANGELOG2
-rw-r--r--src/client/QXmppOutgoingClient.cpp6
2 files changed, 8 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 54775d29..0a9f220a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,8 @@ QXmpp 0.7.6 (UNRELEASED)
------------------------
- Add QXmppClient::insertExtension to insert an extension at a given index.
+ - Disable Facebook / Google / Facebook specific mechanisms if we do not
+ have the corresponding credentials.
QXmpp 0.7.5 (Jan 11, 2013)
--------------------------
diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp
index bb6f0740..f9d7c7df 100644
--- a/src/client/QXmppOutgoingClient.cpp
+++ b/src/client/QXmppOutgoingClient.cpp
@@ -377,6 +377,12 @@ void QXmppOutgoingClient::handleStanza(const QDomElement &nodeRecv)
// supported and preferred SASL auth mechanisms
QStringList supportedMechanisms = QXmppSaslClient::availableMechanisms();
const QString preferredMechanism = configuration().saslAuthMechanism();
+ if (configuration().facebookAppId().isEmpty() || configuration().facebookAccessToken().isEmpty())
+ supportedMechanisms.removeAll("X-FACEBOOK-PLATFORM");
+ if (configuration().windowsLiveAccessToken().isEmpty())
+ supportedMechanisms.removeAll("X-MESSENGER-OAUTH2");
+ if (configuration().googleAccessToken().isEmpty())
+ supportedMechanisms.removeAll("X-OAUTH2");
// determine SASL Authentication mechanism to use
QStringList commonMechanisms;