summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-08-10 13:09:02 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-12 18:45:56 +0000
commit42a176f3fe593d64ecfde962c3afe123804a6af3 (patch)
treee633b146139b0ce292091db9b26f6899867e447a
parent0dd2746319327cdddaeff854dd3b49337c0a8c1e (diff)
Remove local-access-allowed from qrc
Change-Id: I120f4e4e167d621efb6c13f5d16cc13134540352 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit a3a330a9ae031bd19796d62f5e91bc25f5f97769) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/core/web_engine_context.cpp1
-rw-r--r--tests/auto/core/origins/tst_origins.cpp4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index fffcfad8..c9f82c31 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -657,7 +657,6 @@ WebEngineContext::WebEngineContext()
// User might have registered "qrc" already with different options.
QWebEngineUrlScheme qrcScheme(QByteArrayLiteral("qrc"));
qrcScheme.setFlags(QWebEngineUrlScheme::SecureScheme
- | QWebEngineUrlScheme::LocalAccessAllowed
| QWebEngineUrlScheme::ViewSourceAllowed);
QWebEngineUrlScheme::registerScheme(qrcScheme);
}
diff --git a/tests/auto/core/origins/tst_origins.cpp b/tests/auto/core/origins/tst_origins.cpp
index 1aeb3628..518b2004 100644
--- a/tests/auto/core/origins/tst_origins.cpp
+++ b/tests/auto/core/origins/tst_origins.cpp
@@ -553,10 +553,10 @@ void tst_Origins::mixedSchemes()
QTRY_COMPARE(eval(QSL("result")), QVariant(QSL("canLoadButNotAccess")));
QVERIFY(verifyLoad(QSL("qrc:/resources/mixedSchemes.html")));
- QTest::ignoreMessage(QtSystemMsg, QRegularExpression(QSL("Uncaught SecurityError")));
+ QTest::ignoreMessage(QtSystemMsg, QRegularExpression(QSL("Not allowed to load local resource")));
eval("setIFrameUrl('file:" + QDir(QT_TESTCASE_SOURCEDIR).canonicalPath()
+ "/resources/mixedSchemes_frame.html')");
- QTRY_COMPARE(eval(QSL("result")), QVariant(QSL("canLoadButNotAccess")));
+ QTRY_COMPARE(eval(QSL("result")), QVariant(QSL("cannotLoad")));
eval(QSL("setIFrameUrl('qrc:/resources/mixedSchemes_frame.html')"));
QTRY_COMPARE(eval(QSL("result")), QVariant(QSL("canLoadAndAccess")));
QTest::ignoreMessage(QtSystemMsg, QRegularExpression(QSL("Uncaught SecurityError")));