diff options
author | cookie <cookie@samsung.com> | 2017-10-19 11:02:19 +0000 |
---|---|---|
committer | cookie <cookie@samsung.com> | 2017-10-19 11:02:19 +0000 |
commit | e3ec7eb49fee09337840753e6e36042f6a52d050 (patch) | |
tree | ea7693753893c228b1aff0418c9d281fa332b4c8 | |
parent | 20a40a5b6f7271e8694000d70d09438985f7419d (diff) | |
download | browser-e3ec7eb49fee09337840753e6e36042f6a52d050.tar.gz browser-e3ec7eb49fee09337840753e6e36042f6a52d050.tar.bz2 browser-e3ec7eb49fee09337840753e6e36042f6a52d050.zip |
Fix the Security Issuetizen_4.0.m2_releasetizen_4.0.IoT.p2_releasesubmit/tizen_4.0/20171019.111726accepted/tizen/4.0/unified/20171020.014634
There is the file schema issue so it fixed
Change-Id: I4b9c98b5510544e51f641acbcac4b40604f88e3c
Signed-off-by: cookie <cookie@samsung.com>
-rwxr-xr-x | services/WebPageUI/URIEntry.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/services/WebPageUI/URIEntry.cpp b/services/WebPageUI/URIEntry.cpp index 2e6fc23..a999e74 100755 --- a/services/WebPageUI/URIEntry.cpp +++ b/services/WebPageUI/URIEntry.cpp @@ -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)) && |