Most important, they should not be composed of '/'s.
Change-Id: Ia6a9441680c5ceb05abec2defc7c9f866fd58bef
return std::regex_match(id, package_regex);
}
+bool ValidateTizenNativeId(const std::string& id) {
+ return id.find_first_of('/') == std::string::npos;
+}
+
+
} // namespace parser
bool ValidateTizenApplicationId(const std::string& id);
bool ValidateTizenPackageId(const std::string& id);
+bool ValidateTizenNativeId(const std::string& id);
} // namespace parser
"The package child element of manifest element is obligatory";
return false;
}
+ if (!parser::ValidateTizenNativeId(package)) {
+ *error = "The package name should be composed of alphanumeric characters "
+ "optionally separate with dots.";
+ return false;
+ }
const std::string& version = app_info.version();
if (version.empty()) {
"service application element is obligatory";
return false;
}
+ if (!parser::ValidateTizenNativeId(item.app_info.appid())) {
+ *error = "The application id should be composed of alphanumerics "
+ "optionally separate with dots.";
+ return false;
+ }
+
const std::string& exec = item.app_info.exec();
if (exec.empty()) {
*error =
return false;
}
+ if (!parser::ValidateTizenNativeId(item.app_info.appid())) {
+ *error = "The application id should be composed of alphanumerics "
+ "optionally separate with dots.";
+ return false;
+ }
+
const std::string& exec = item.app_info.exec();
if (exec.empty()) {
*error = "The exec child element of ui-application element is obligatory";
return false;
}
+ if (!parser::ValidateTizenNativeId(item.app_info.appid())) {
+ *error = "The application id should be composed of alphanumerics "
+ "optionally separate with dots.";
+ return false;
+ }
+
const std::string& exec = item.app_info.exec();
if (exec.empty()) {
*error = "The exec child element of widget-application element "