diff options
-rw-r--r-- | chromium/mojo/core/node_controller.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/mojo/core/node_controller.cc b/chromium/mojo/core/node_controller.cc index 52082c3c289..d0f50b16815 100644 --- a/chromium/mojo/core/node_controller.cc +++ b/chromium/mojo/core/node_controller.cc @@ -22,6 +22,7 @@ #include "mojo/core/broker.h" #include "mojo/core/broker_host.h" #include "mojo/core/configuration.h" +#include "mojo/core/ports/name.h" #include "mojo/core/request_context.h" #include "mojo/core/user_message_impl.h" #include "mojo/public/cpp/platform/named_platform_channel.h" @@ -1063,6 +1064,12 @@ void NodeController::OnIntroduce(const ports::NodeName& from_node, PlatformHandle channel_handle) { DCHECK(io_task_runner_->RunsTasksInCurrentSequence()); + if (broker_name_ == ports::kInvalidNodeName || from_node != broker_name_) { + DVLOG(1) << "Ignoring introduction from non-broker process."; + DropPeer(from_node, nullptr); + return; + } + if (!channel_handle.is_valid()) { node_->LostConnectionToNode(name); |