summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2018-07-17 11:44:57 +0200
committerFlorian Bruhin <qt-project.org@the-compiler.org>2018-07-19 15:27:22 +0000
commite96f036ac82fd280f1938eaa7a5a8f15fd844325 (patch)
tree70c7061773284e733cbad6009efb66271d79f1a7 /src/core
parentdf3681dc6c401f3cebb6e767ef8b8ca4e1a8260b (diff)
Enable XSS auditing by default
Chromium has XSS auditing enabled by default - it seems like a bad idea for QtWebEngine to disable a Chromium security feature by default. The Google design document for the XSS auditor also claims[1]: Processing costs are essentially zero unless the URL or POST body includes any of the four characters " > < '. When those characters are found, we only invoke heavy processing on those attributes that might be dangerous. This stands in contrast to the XSS Filter in Internet Explorer, which runs costly regular expressions. Thus, worries about performance issues are likely unsubstantiated. This can be tested using the first link on [2], where Chromium blocks loading by default but QtWebEngine did not. [1] https://www.chromium.org/developers/design-documents/xss-auditor [2] http://webdbg.com/test/xss/auditor.aspx [ChangeLog][QtWebEngine] The XSSAuditingEnabled setting is now enabled by default, to mirror Chromium's behavior. Change-Id: Id57177ec8183335bc94cc8c0c440ac1e10d2c74f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/web_engine_settings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index b45d47b46..129a3f01d 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -262,7 +262,7 @@ void WebEngineSettings::initDefaults()
s_defaultAttributes.insert(LinksIncludedInFocusChain, true);
s_defaultAttributes.insert(LocalStorageEnabled, true);
s_defaultAttributes.insert(LocalContentCanAccessRemoteUrls, false);
- s_defaultAttributes.insert(XSSAuditingEnabled, false);
+ s_defaultAttributes.insert(XSSAuditingEnabled, true);
s_defaultAttributes.insert(SpatialNavigationEnabled, false);
s_defaultAttributes.insert(LocalContentCanAccessFileUrls, true);
s_defaultAttributes.insert(HyperlinkAuditingEnabled, false);