diff options
author | AKalinich-Luxoft <AKalinich@luxoft.com> | 2017-09-04 10:33:37 +0300 |
---|---|---|
committer | AKalinich-Luxoft <AKalinich@luxoft.com> | 2017-09-04 10:33:37 +0300 |
commit | 8740cda8f9bc05943553b7b7fb5661e4a624d534 (patch) | |
tree | f3ea8fc9d2621db9cd738f32a86760fe529623c2 | |
parent | f366d8301d3f8519a33e9165bdd151e590009d74 (diff) | |
download | sdl_core-8740cda8f9bc05943553b7b7fb5661e4a624d534.tar.gz |
Fix response for RC functionality for apss without RC HMI type
There was no checks that application, which sends RC-related RPCs,
has REMOTE_CONTROL type, therefore SDL successfully processes RC RPCs
from such applications.
Was added check into BaseCommandRequest::CheckPolicyPermissions()
to avoid such situation.
-rw-r--r-- | src/components/remote_control/src/commands/base_command_request.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/components/remote_control/src/commands/base_command_request.cc b/src/components/remote_control/src/commands/base_command_request.cc index 925f0c4e4e..e74e51439b 100644 --- a/src/components/remote_control/src/commands/base_command_request.cc +++ b/src/components/remote_control/src/commands/base_command_request.cc @@ -348,6 +348,12 @@ bool BaseCommandRequest::CheckPolicyPermissions() { return false; } + if (!service_->IsRemoteControlApplication(app_)) { + LOG4CXX_WARN(logger_, "Application has no remote control functions"); + SendResponse(false, result_codes::kDisallowed, ""); + return false; + } + mobile_apis::Result::eType ret = service_->CheckPolicyPermissions(message_); if (ret != mobile_apis::Result::eType::SUCCESS) { LOG4CXX_WARN(logger_, |