summaryrefslogtreecommitdiff
path: root/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc')
-rw-r--r--src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc
index b46bc7934e..1aa8504ff9 100644
--- a/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc
+++ b/src/components/application_manager/rpc_plugins/app_service_rpc_plugin/src/commands/mobile/on_app_service_data_notification_from_mobile.cc
@@ -59,6 +59,22 @@ void OnAppServiceDataNotificationFromMobile::Run() {
LOG4CXX_AUTO_TRACE(logger_);
LOG4CXX_DEBUG(logger_, "Received an OnAppServiceData");
MessageHelper::PrintSmartObject(*message_);
+
+ std::string service_type =
+ (*message_)[strings::msg_params][strings::app_service_manifest]
+ [strings::service_type].asString();
+
+ ApplicationSharedPtr app = application_manager_.application(connection_key());
+
+ bool result = policy_handler_.CheckAppServiceParameters(
+ app->policy_app_id(), std::string(), service_type, NULL);
+
+ if (!result) {
+ LOG4CXX_DEBUG(logger_,
+ "Incorrect service type received in "
+ "OnAppServiceDataNotificationFromMobile");
+ return;
+ }
}
} // namespace commands