diff --git a/include/Swiften/Server/ServerFromClientSession.cpp b/include/Swiften/Server/ServerFromClientSession.cpp index c0a229a10781a4df8e2bc8a97153a12abca6d329..a58178073ec1042860c9b1333a9fcf753ca4a676 100644 --- a/include/Swiften/Server/ServerFromClientSession.cpp +++ b/include/Swiften/Server/ServerFromClientSession.cpp @@ -24,6 +24,7 @@ #include #include #include +#include namespace Swift { @@ -65,8 +66,10 @@ void ServerFromClientSession::handlePasswordInvalid(const std::string &user) { if (user != JID(user_, getLocalJID().getDomain()).toString() || authenticated_) return; if (!isInitialized()) { + user_ = "/././"; getXMPPLayer()->writeElement(boost::shared_ptr(new AuthFailure)); finishSession(AuthenticationFailedError); + onPasswordInvalid(); } }