From ed71b2fbf530af59dff51782dc7e37e6d25e0954 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 12 May 2020 14:42:04 +0200 Subject: [PATCH] [tracking] Only accept valid policy URLs --- src/modules/tracking/Config.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/tracking/Config.cpp b/src/modules/tracking/Config.cpp index d920074fa..67da7025d 100644 --- a/src/modules/tracking/Config.cpp +++ b/src/modules/tracking/Config.cpp @@ -21,6 +21,8 @@ #include "utils/Logger.h" #include "utils/Variant.h" +#include + Config::Config( QObject* parent ) : QObject( parent ) { @@ -30,6 +32,12 @@ void Config::setConfigurationMap( const QVariantMap& m ) { m_generalPolicy = CalamaresUtils::getString( m, "policy" ); + + if ( !QUrl( m_generalPolicy ).isValid() ) + { + m_generalPolicy = QString(); + } + emit generalPolicyChanged( m_generalPolicy ); }