summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeloader.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-03-23 04:51:56 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-03-23 04:51:56 (GMT)
commit95aa8c8fc76e2309a629b05994a2677b0887140b (patch)
tree50d7318281610f24df5a9736906a9a6433aba7d8 /src/declarative/graphicsitems/qdeclarativeloader.cpp
parent9a41034cf05ad4c149e3a98dc8e39f5f6ad05d28 (diff)
downloadQt-95aa8c8fc76e2309a629b05994a2677b0887140b.zip
Qt-95aa8c8fc76e2309a629b05994a2677b0887140b.tar.gz
Qt-95aa8c8fc76e2309a629b05994a2677b0887140b.tar.bz2
Basic Loader origin safety (for discussion).
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeloader.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
index 745734e..3cbafd6 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -185,6 +185,9 @@ void QDeclarativeLoader::setSource(const QUrl &url)
if (d->source == url)
return;
+ if (!qmlContext(this)->isSafeOrigin(url))
+ return;
+
d->clear();
d->source = url;