From c0cb2a9b2c2e655179ff008a62a21b61272c3814 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 29 Oct 2010 15:14:47 +0000 Subject: [PATCH] use m_package->filePath() to resolve the path, includes already security checks (and eventual future fallback) svn path=/trunk/KDE/kdebase/runtime/; revision=1191099 --- scriptengines/javascript/declarative/packageaccessmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scriptengines/javascript/declarative/packageaccessmanager.cpp b/scriptengines/javascript/declarative/packageaccessmanager.cpp index 7bfbc5198..a3a63af4c 100644 --- a/scriptengines/javascript/declarative/packageaccessmanager.cpp +++ b/scriptengines/javascript/declarative/packageaccessmanager.cpp @@ -66,7 +66,7 @@ QNetworkReply *PackageAccessManager::createRequest(QNetworkAccessManager::Operat if (reqUrl.scheme() == "plasmapackage") { QNetworkRequest request = req; reqUrl.setScheme("file"); - reqUrl.setPath(m_package->path()+"/contents/"+reqUrl.path()); + reqUrl.setPath(m_package->filePath(0, reqUrl.path())); request.setUrl(reqUrl); return QNetworkAccessManager::createRequest(op, request, outgoingData); } else if ((reqUrl.scheme() == "http" && !m_auth->authorizeRequiredExtension("http")) ||