diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-04-17 17:16:23 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-04-28 19:29:19 +0000 |
commit | 9cbcd93cfe0ba6f7531574f7784e8978bd723110 (patch) | |
tree | 2f7c926e7f334669b7885ecd219a197bd181de0c /Source/WebKit/qt/Api/qwebsettings.cpp | |
parent | 8ce4aba7d1742f07c01f2786e75ff7a5c8386aa6 (diff) | |
download | qtwebkit-9cbcd93cfe0ba6f7531574f7784e8978bd723110.tar.gz |
Enforce no remote access from local URLs for XHR
Add a specific setting to disable remote access for local URLs and also
enforce that on data-URLs loaded owned by local URLs.
Change-Id: Ied8ec141eb1c28775644fce184a4759a79e1d177
Task-number: QTBUG-45556
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'Source/WebKit/qt/Api/qwebsettings.cpp')
-rw-r--r-- | Source/WebKit/qt/Api/qwebsettings.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp index cb969a3df..f55b6d721 100644 --- a/Source/WebKit/qt/Api/qwebsettings.cpp +++ b/Source/WebKit/qt/Api/qwebsettings.cpp @@ -272,9 +272,10 @@ void QWebSettingsPrivate::apply() global->attributes.value(QWebSettings::LocalStorageEnabled)); settings->setLocalStorageEnabled(value); - value = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls, + bool remoteAccess = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls, global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls)); - settings->setAllowUniversalAccessFromFileURLs(value); + settings->setAllowUniversalAccessFromFileURLs(remoteAccess); + settings->setAllowRemoteAccessFromFileURLs(remoteAccess); value = attributes.value(QWebSettings::LocalContentCanAccessFileUrls, global->attributes.value(QWebSettings::LocalContentCanAccessFileUrls)); |