Fix the Security Issue 80/156680/1 accepted/tizen/4.0/unified/20171020.014634 submit/tizen_4.0/20171019.111726 tizen_4.0.IoT.p2_release tizen_4.0.m2_release
authorcookie <cookie@samsung.com>
Thu, 19 Oct 2017 11:02:19 +0000 (11:02 +0000)
committercookie <cookie@samsung.com>
Thu, 19 Oct 2017 11:02:19 +0000 (11:02 +0000)
There is the file schema issue so it fixed

Change-Id: I4b9c98b5510544e51f641acbcac4b40604f88e3c
Signed-off-by: cookie <cookie@samsung.com>
services/WebPageUI/URIEntry.cpp

index 2e6fc23f3d37a713d88ed516631c86a3d83752f8..a999e742f05668677f8cdaeb900fb32466cba455 100755 (executable)
@@ -276,14 +276,13 @@ std::string URIEntry::rewriteURI(const std::string& url) const
     boost::regex aboutRegex(R"(^about:[^\s]*$)");
     boost::regex fileRegex(R"(^file:///[^\s]*$)");
     boost::regex myfilesappRegex(R"(^file:///opt/usr/media/[^\s]*$)");
-    boost::regex myfilesappetcRegex(R"(^file:///opt/usr/media/../[^\s]*$)");
 
     if (!url.empty()) {
         if (boost::regex_match(url, urlRegex) ||
             boost::regex_match(url, aboutRegex) ||
             boost::regex_match(url, chromeRegex) ||
             (boost::regex_match(url, myfilesappRegex) &&
-             !boost::regex_match(url, myfilesappetcRegex))) {
+            (url.find("../") == std::string::npos))) {
             return url;
         } else if (boost::regex_match(std::string("http://") + url, urlRegex) &&
             (!boost::regex_match(url, fileRegex)) &&