diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-06-03 12:25:57 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-06-03 12:46:12 (GMT) |
commit | 21fda3308975201eeebeacd98e2b587ef4448862 (patch) | |
tree | e8aebe473a636cf5a312814d4054d8af0d9ad6a6 /Swiften/Serializer/AuthChallengeSerializer.cpp | |
parent | 10334c139670861d4860da59ad837fc3fe6fd41e (diff) | |
download | swift-contrib-21fda3308975201eeebeacd98e2b587ef4448862.zip swift-contrib-21fda3308975201eeebeacd98e2b587ef4448862.tar.bz2 |
Limit the use of the SafeString type.
Diffstat (limited to 'Swiften/Serializer/AuthChallengeSerializer.cpp')
-rw-r--r-- | Swiften/Serializer/AuthChallengeSerializer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/Serializer/AuthChallengeSerializer.cpp b/Swiften/Serializer/AuthChallengeSerializer.cpp index 445059d..1ddc165 100644 --- a/Swiften/Serializer/AuthChallengeSerializer.cpp +++ b/Swiften/Serializer/AuthChallengeSerializer.cpp @@ -15,7 +15,7 @@ namespace Swift { AuthChallengeSerializer::AuthChallengeSerializer() { } -SafeString AuthChallengeSerializer::serialize(boost::shared_ptr<Element> element) const { +SafeByteArray AuthChallengeSerializer::serialize(boost::shared_ptr<Element> element) const { boost::shared_ptr<AuthChallenge> authChallenge(boost::dynamic_pointer_cast<AuthChallenge>(element)); std::string value; boost::optional<std::vector<unsigned char> > message = authChallenge->getValue(); @@ -27,7 +27,7 @@ SafeString AuthChallengeSerializer::serialize(boost::shared_ptr<Element> element value = Base64::encode(ByteArray(*message)); } } - return "<challenge xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" + value + "</challenge>"; + return createSafeByteArray("<challenge xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" + value + "</challenge>"); } } |