[tracking] Only accept valid policy URLs

This commit is contained in:
Adriaan de Groot 2020-05-12 14:42:04 +02:00
parent 044f5ce2b5
commit ed71b2fbf5

View File

@ -21,6 +21,8 @@
#include "utils/Logger.h"
#include "utils/Variant.h"
#include <QUrl>
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 );
}