summaryrefslogtreecommitdiffstats
path: root/remoting/host/remoting_me2me_host.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-12 02:02:16 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-12 02:02:16 +0000
commiteff1b5d80202924c20878c1c0bd17bfd8f5fd8f1 (patch)
treef6aaa6d323db874751d18aa7e937fc54bab89bbd /remoting/host/remoting_me2me_host.cc
parent70adc1373596185e685facda48c605cb6987e923 (diff)
downloadchromium_src-eff1b5d80202924c20878c1c0bd17bfd8f5fd8f1.zip
chromium_src-eff1b5d80202924c20878c1c0bd17bfd8f5fd8f1.tar.gz
chromium_src-eff1b5d80202924c20878c1c0bd17bfd8f5fd8f1.tar.bz2
Verify that xmpp_login specified in the config matches auth token.
Previously the host would ignore the case when the oauth token doesn't match the xmpp_login specified in the config. That would lead to situations when host is connected with one account, but verifies incoming connections with a different account. Fix this by verifying that the JID that we receive from XMPP server matches the value in the config. Review URL: https://chromiumcodereview.appspot.com/10378110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136745 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/remoting_me2me_host.cc')
-rw-r--r--remoting/host/remoting_me2me_host.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index bb7a7ea..195d91c 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -335,8 +335,9 @@ class HostProcess
new XmppSignalStrategy(context_->jingle_thread(), xmpp_login_,
xmpp_auth_token_, xmpp_auth_service_));
- signaling_connector_.reset(
- new SignalingConnector(signal_strategy_.get()));
+ signaling_connector_.reset(new SignalingConnector(
+ signal_strategy_.get(),
+ base::Bind(&HostProcess::OnAuthFailed, base::Unretained(this))));
if (!oauth_refresh_token_.empty()) {
OAuthClientInfo client_info = {
@@ -360,7 +361,6 @@ class HostProcess
xmpp_login_, oauth_refresh_token_, client_info));
signaling_connector_->EnableOAuth(
oauth_credentials.Pass(),
- base::Bind(&HostProcess::OnOAuthFailed, base::Unretained(this)),
context_->url_request_context_getter());
}
}
@@ -401,7 +401,7 @@ class HostProcess
CreateAuthenticatorFactory();
}
- void OnOAuthFailed() {
+ void OnAuthFailed() {
Shutdown(kInvalidOauthCredentialsExitCode);
}