use m_package->filePath() to resolve the path, includes already security checks (and eventual future fallback)

svn path=/trunk/KDE/kdebase/runtime/; revision=1191099
This commit is contained in:
Marco Martin 2010-10-29 15:14:47 +00:00
parent 7e0e77b970
commit c0cb2a9b2c

View File

@ -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")) ||