diff options
Diffstat (limited to 'Swiften/SASL/PLAINClientAuthenticator.cpp')
-rw-r--r-- | Swiften/SASL/PLAINClientAuthenticator.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Swiften/SASL/PLAINClientAuthenticator.cpp b/Swiften/SASL/PLAINClientAuthenticator.cpp index 2ea2425..675542f 100644 --- a/Swiften/SASL/PLAINClientAuthenticator.cpp +++ b/Swiften/SASL/PLAINClientAuthenticator.cpp @@ -4,7 +4,8 @@ * See Documentation/Licenses/GPLv3.txt for more information. */ -#include "Swiften/SASL/PLAINClientAuthenticator.h" +#include <Swiften/SASL/PLAINClientAuthenticator.h> +#include <Swiften/Base/Concat.h> namespace Swift { @@ -12,7 +13,7 @@ PLAINClientAuthenticator::PLAINClientAuthenticator() : ClientAuthenticator("PLAI } boost::optional<ByteArray> PLAINClientAuthenticator::getResponse() const { - return ByteArray(getAuthorizationID()) + '\0' + ByteArray(getAuthenticationID()) + '\0' + ByteArray(getPassword()); + return concat(createByteArray(getAuthorizationID()), createByteArray('\0'), createByteArray(getAuthenticationID()), createByteArray('\0'), createByteArray(getPassword())); } bool PLAINClientAuthenticator::setChallenge(const boost::optional<ByteArray>&) { |