Chromium Code Reviews| Index: third_party/libjingle_xmpp/xmpp/saslplainmechanism.h |
| diff --git a/third_party/libjingle_xmpp/xmpp/saslplainmechanism.h b/third_party/libjingle_xmpp/xmpp/saslplainmechanism.h |
| index b173c524f9f7d15a9d2db1a3d8529865f81d03d7..d7319b483c55a209efa43812311a0230c588509b 100644 |
| --- a/third_party/libjingle_xmpp/xmpp/saslplainmechanism.h |
| +++ b/third_party/libjingle_xmpp/xmpp/saslplainmechanism.h |
| @@ -12,14 +12,13 @@ |
| #define WEBRTC_LIBJINGLE_XMPP_SASLPLAINMECHANISM_H_ |
| #include "third_party/libjingle_xmpp/xmpp/saslmechanism.h" |
| -#include "third_party/webrtc/base/cryptstring.h" |
| namespace buzz { |
| class SaslPlainMechanism : public SaslMechanism { |
| public: |
| - SaslPlainMechanism(const buzz::Jid user_jid, const rtc::CryptString & password) : |
| + SaslPlainMechanism(const buzz::Jid user_jid, const std::string & password) : |
| user_jid_(user_jid), password_(password) {} |
| virtual std::string GetMechanismName() { return "PLAIN"; } |
| @@ -29,18 +28,18 @@ public: |
| XmlElement * el = new XmlElement(QN_SASL_AUTH, true); |
| el->AddAttr(QN_MECHANISM, "PLAIN"); |
| - rtc::FormatCryptString credential; |
| - credential.Append("\0", 1); |
| - credential.Append(user_jid_.node()); |
| - credential.Append("\0", 1); |
| - credential.Append(&password_); |
| - el->AddText(Base64EncodeFromArray(credential.GetData(), credential.GetLength())); |
| + std::stringstream ss; |
| + ss.write("\0", 1); |
| + ss << user_jid_.node(); |
| + ss.write("\0", 1); |
| + ss << password_; |
| + el->AddText(Base64EncodeFromArray(ss.str().data(), ss.str().length())); |
|
nisse-chromium (ooo August 14)
2017/03/09 13:01:57
I think this is where the password is ultimately u
|
| return el; |
| } |
| private: |
| Jid user_jid_; |
| - rtc::CryptString password_; |
| + std::string password_; |
| }; |
| } |