From bacfe4e165b74a2213bee0a4b55a19926374eadb Mon Sep 17 00:00:00 2001 From: Karol Pawlowski Date: Tue, 1 Oct 2013 14:21:01 +0200 Subject: [PATCH] Id in element should begin with [Issue#] WGL-573 [Problem] Valid Id of element should be in format of . [Cause] Missing proper routine to check this condition. [Solution] Add routine to check app-widget id. [Verification] * Install widget attached to issue, which should fail: https://bugs.tizendev.org/jira/browse/WGL-573 * Install correct widget, which should pass: https://bugs.tizendev.org/jira/browse/WGL-574 Change-Id: I07c408f192aab083cd0513e73bc35ffab7ed870d --- src/jobs/widget_install/task_process_config.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jobs/widget_install/task_process_config.cpp b/src/jobs/widget_install/task_process_config.cpp index f2967b9..3e41d24 100755 --- a/src/jobs/widget_install/task_process_config.cpp +++ b/src/jobs/widget_install/task_process_config.cpp @@ -508,6 +508,11 @@ void TaskProcessConfig::StepVerifyLivebox() FOREACH (it, liveBoxList) { std::string boxType; + if ((**it).m_liveboxId.find(m_installContext.widgetConfig.tzAppid) != 0) { + _E("Invalid app-widget id (doesn't begin with application id)"); + ThrowMsg(Exceptions::WidgetConfigFileInvalid, "Invalid app-widget id (doesn't begin with application id)"); + } + if ((**it).m_type.empty()) { boxType = web_provider_livebox_get_default_type(); } else { -- 2.7.4