summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-06-03 18:11:02 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-06-03 18:11:02 (GMT)
commitc3fa606c7ac060c4929e7082e0e24531b093112f (patch)
tree394cf72c0b43fa706319592dfdb1438335b6116a /Swiften/Server
parent8406d818fcb2a511b1e4264a10fd9069ec020d72 (diff)
downloadswift-c3fa606c7ac060c4929e7082e0e24531b093112f.zip
swift-c3fa606c7ac060c4929e7082e0e24531b093112f.tar.bz2
Distinguish an empty SASL message from no SASL message.
Diffstat (limited to 'Swiften/Server')
-rw-r--r--Swiften/Server/ServerFromClientSession.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swiften/Server/ServerFromClientSession.cpp b/Swiften/Server/ServerFromClientSession.cpp
index 424688f..882946d 100644
--- a/Swiften/Server/ServerFromClientSession.cpp
+++ b/Swiften/Server/ServerFromClientSession.cpp
@@ -48,7 +48,7 @@ void ServerFromClientSession::handleElement(boost::shared_ptr<Element> element)
finishSession(NoSupportedAuthMechanismsError);
}
else {
- PLAINMessage plainMessage(authRequest->getMessage());
+ PLAINMessage plainMessage(authRequest->getMessage() ? *authRequest->getMessage() : "");
if (userRegistry_->isValidUserPassword(JID(plainMessage.getAuthenticationID(), getLocalJID().getDomain()), plainMessage.getPassword())) {
getXMPPLayer()->writeElement(boost::shared_ptr<AuthSuccess>(new AuthSuccess()));
user_ = plainMessage.getAuthenticationID();