Make the rules for redirects a bit stricter.
authorRichard Moore <rich@kde.org>
Mon, 19 Nov 2012 20:48:39 +0000 (20:48 +0000)
committerLisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Tue, 5 Feb 2013 21:52:29 +0000 (21:52 +0000)
Change-Id: I7a3cec664aa028202de3d3bda9f499e4deb2998d

Gbp-Pq: Name make_rules_for_redirect_stricter.patch

src/declarative/qml/qdeclarativexmlhttprequest.cpp

index 3348a7d2775bcbcdd0d03bc424b8aff6b42dc0d6..2da0cf95a72e73c290285a4c40f362e3d86df313 100644 (file)
@@ -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;
+            }
         }
     }