From: Karol Pawlowski Date: Tue, 1 Oct 2013 12:21:01 +0000 (+0200) Subject: Id in element should begin with X-Git-Tag: 2.2.1_release~9^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bacfe4e165b74a2213bee0a4b55a19926374eadb;p=framework%2Fweb%2Fwrt-installer.git 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 --- 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 {