diff options
author | sergeyu <sergeyu@chromium.org> | 2015-05-06 16:00:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-06 23:00:52 +0000 |
commit | 8916cd0a41e708d4c00e96dae7960cb9e634794e (patch) | |
tree | 69436885a4195f849143207634e2076b4925ea79 /remoting/signaling/jid_util.h | |
parent | 51bf98859f09d62152a3662839f93b9efad826c5 (diff) | |
download | chromium_src-8916cd0a41e708d4c00e96dae7960cb9e634794e.zip chromium_src-8916cd0a41e708d4c00e96dae7960cb9e634794e.tar.gz chromium_src-8916cd0a41e708d4c00e96dae7960cb9e634794e.tar.bz2 |
Normalize JIDs when generating signatures for messages sent to CRD bot.
When generating signatures for the messages sent to the bot the JID
must be normalized, i.e. node and domain parts must be in lower-case.
XmppSignalStrategy::GetLocalJid() was previously returning normalized
value, but it was changed recently, which broke hosts that use account
with upper-case characters in the name.
BUG=485134
Review URL: https://codereview.chromium.org/1131653002
Cr-Commit-Position: refs/heads/master@{#328646}
Diffstat (limited to 'remoting/signaling/jid_util.h')
-rw-r--r-- | remoting/signaling/jid_util.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/remoting/signaling/jid_util.h b/remoting/signaling/jid_util.h new file mode 100644 index 0000000..e7bd7bc --- /dev/null +++ b/remoting/signaling/jid_util.h @@ -0,0 +1,18 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef REMOTING_SIGNALING_JID_UTIL_H_ +#define REMOTING_SIGNALING_JID_UTIL_H_ + +#include <string> + +namespace remoting { + +// Normalizes the |jid| by converting case-insensitive parts (node and domain) +// to lower-case. +std::string NormalizeJid(const std::string& jid); + +} // namespace remoting + +#endif // REMOTING_SIGNALING_JID_UTIL_H_ |