summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/SASL/PLAINClientAuthenticator.cpp')
-rw-r--r--Swiften/SASL/PLAINClientAuthenticator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/SASL/PLAINClientAuthenticator.cpp b/Swiften/SASL/PLAINClientAuthenticator.cpp
index 1714182..675542f 100644
--- a/Swiften/SASL/PLAINClientAuthenticator.cpp
+++ b/Swiften/SASL/PLAINClientAuthenticator.cpp
@@ -5,6 +5,7 @@
*/
#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>&) {