diff options
author | rmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-19 03:34:50 +0000 |
---|---|---|
committer | rmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-19 03:34:50 +0000 |
commit | 940be76667d9330fb7e817b5bc624fd32ac3acd6 (patch) | |
tree | a52e5711f95d51e48e6e01d3bccf04e7102aa951 /remoting/host/plugin/host_script_object.cc | |
parent | 78237b37ee1cfd465fc64dfde9e80c3403e37f67 (diff) | |
download | chromium_src-940be76667d9330fb7e817b5bc624fd32ac3acd6.zip chromium_src-940be76667d9330fb7e817b5bc624fd32ac3acd6.tar.gz chromium_src-940be76667d9330fb7e817b5bc624fd32ac3acd6.tar.bz2 |
Move it2me business logic out of the UI class
BUG=156257
Review URL: https://chromiumcodereview.appspot.com/11194069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/plugin/host_script_object.cc')
-rw-r--r-- | remoting/host/plugin/host_script_object.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc index 664d132..52d9196 100644 --- a/remoting/host/plugin/host_script_object.cc +++ b/remoting/host/plugin/host_script_object.cc @@ -447,6 +447,14 @@ void HostNPScriptObject::It2MeImpl::OnClientAuthenticated( // Ignore the new connection if we are disconnecting. return; } + if (state_ == kConnected) { + // If we already connected another client then one of the connections may be + // an attacker, so both are suspect and we have to reject the second + // connection and shutdown the host. + host_->RejectAuthenticatingClient(); + Disconnect(); + return; + } std::string client_username = jid; size_t pos = client_username.find('/'); |