diff options
author | Richard Moore <rich@kde.org> | 2012-11-19 20:48:39 +0000 |
---|---|---|
committer | Marko Valtanen <marko.valtanen@digia.com> | 2012-12-04 15:20:53 +0200 |
commit | 8e4311eddca146a9f35dedb2f4a69719621d0cc9 (patch) | |
tree | 52cf67590fe1ae3fd8074e10fa9e67ca68bc21cb | |
parent | 9cecd48c2654fec22a8a3dbb836dea7b82473eb7 (diff) |
Make the rules for redirects a bit stricter.
Change-Id: I7a3cec664aa028202de3d3bda9f499e4deb2998d
-rw-r--r-- | src/declarative/qml/qdeclarativexmlhttprequest.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp index f8bd769c4b..b25b7203e0 100644 --- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp +++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp @@ -1270,9 +1270,11 @@ void QDeclarativeXMLHttpRequest::finished() QVariant redirect = m_network->attribute(QNetworkRequest::RedirectionTargetAttribute); if (redirect.isValid()) { QUrl url = m_network->url().resolved(redirect.toUrl()); - destroyNetwork(); - requestFromUrl(url); - return; + if (url.scheme().toLower() != QLatin1String("file")) { + destroyNetwork(); + requestFromUrl(url); + return; + } } } |