From 2710c66f0c27874aa455be91a6c24c7fd7fa7523 Mon Sep 17 00:00:00 2001 From: Viktor Engelmann <viktor.engelmann@qt.io> Date: Wed, 4 Jan 2017 14:43:33 +0100 Subject: [PATCH] Add https to list of internal schemes Since https is an internal scheme, it should be in this list of internal schems. This also prevents custom custom QWebEngineUrlSchemeHandlers to register "https". Although it is debatable whether this is necessary, https should be held to at least the same security standards as http, which is also in that list. Task-number: QTBUG-56894 Change-Id: I83d0130541fe3b5831bf29d429bad89a8fc5408c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> --- src/webengine/api/qquickwebengineprofile.cpp | 3 ++- src/webenginewidgets/api/qwebengineprofile.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp index fa30a39e0..12b638b4e 100644 --- a/src/webengine/api/qquickwebengineprofile.cpp +++ b/src/webengine/api/qquickwebengineprofile.cpp @@ -787,7 +787,8 @@ static bool checkInternalScheme(const QByteArray &scheme) static QSet<QByteArray> internalSchemes; if (internalSchemes.isEmpty()) { internalSchemes << QByteArrayLiteral("qrc") << QByteArrayLiteral("data") << QByteArrayLiteral("blob") - << QByteArrayLiteral("http") << QByteArrayLiteral("ftp") << QByteArrayLiteral("javascript"); + << QByteArrayLiteral("http") << QByteArrayLiteral("https") << QByteArrayLiteral("ftp") + << QByteArrayLiteral("javascript"); } return internalSchemes.contains(scheme); } diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index adafc1544..18b9cb487 100644 --- a/src/webenginewidgets/api/qwebengineprofile.cpp +++ b/src/webenginewidgets/api/qwebengineprofile.cpp @@ -643,7 +643,8 @@ static bool checkInternalScheme(const QByteArray &scheme) static QSet<QByteArray> internalSchemes; if (internalSchemes.isEmpty()) { internalSchemes << QByteArrayLiteral("qrc") << QByteArrayLiteral("data") << QByteArrayLiteral("blob") - << QByteArrayLiteral("http") << QByteArrayLiteral("ftp") << QByteArrayLiteral("javascript"); + << QByteArrayLiteral("http") << QByteArrayLiteral("https") << QByteArrayLiteral("ftp") + << QByteArrayLiteral("javascript"); } return internalSchemes.contains(scheme); } -- GitLab