Commit cd92ac48 authored by Laurent Montel's avatar Laurent Montel 😁

increase security

parent e1a21557
......@@ -21,6 +21,7 @@
#include "addresseslocationenginepage.h"
#include <QWebEngineSettings>
#include <QWebEngineProfile>
using namespace Akonadi;
......@@ -37,6 +38,19 @@ AddressesLocationEnginePage::AddressesLocationEnginePage(QObject *parent)
settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false);
settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, false);
settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessFileUrls, false);
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
settings()->setAttribute(QWebEngineSettings::ScreenCaptureEnabled, false);
settings()->setAttribute(QWebEngineSettings::WebGLEnabled, false);
settings()->setAttribute(QWebEngineSettings::AutoLoadIconsForPage, false);
settings()->setAttribute(QWebEngineSettings::Accelerated2dCanvasEnabled, false);
settings()->setAttribute(QWebEngineSettings::WebGLEnabled, false);
#endif
#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, false);
settings()->setAttribute(QWebEngineSettings::AllowRunningInsecureContent, false);
#endif
profile()->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment