diff options
Diffstat (limited to 'Swiften/SASL/PLAINClientAuthenticator.cpp')
| -rw-r--r-- | Swiften/SASL/PLAINClientAuthenticator.cpp | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/Swiften/SASL/PLAINClientAuthenticator.cpp b/Swiften/SASL/PLAINClientAuthenticator.cpp index 2ea2425..7872174 100644 --- a/Swiften/SASL/PLAINClientAuthenticator.cpp +++ b/Swiften/SASL/PLAINClientAuthenticator.cpp @@ -4,15 +4,16 @@   * 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 {  PLAINClientAuthenticator::PLAINClientAuthenticator() : ClientAuthenticator("PLAIN") {  } -boost::optional<ByteArray> PLAINClientAuthenticator::getResponse() const { -	return ByteArray(getAuthorizationID()) + '\0' + ByteArray(getAuthenticationID()) + '\0' + ByteArray(getPassword()); +boost::optional<SafeByteArray> PLAINClientAuthenticator::getResponse() const { +	return concat(createSafeByteArray(getAuthorizationID()), createSafeByteArray('\0'), createSafeByteArray(getAuthenticationID()), createSafeByteArray('\0'), getPassword());  }  bool PLAINClientAuthenticator::setChallenge(const boost::optional<ByteArray>&) { | 
 Swift
 Swift