[tracking] Only accept valid policy URLs

main
Adriaan de Groot 5 years ago
parent 044f5ce2b5
commit ed71b2fbf5

@ -21,6 +21,8 @@
#include "utils/Logger.h" #include "utils/Logger.h"
#include "utils/Variant.h" #include "utils/Variant.h"
#include <QUrl>
Config::Config( QObject* parent ) Config::Config( QObject* parent )
: QObject( parent ) : QObject( parent )
{ {
@ -30,6 +32,12 @@ void
Config::setConfigurationMap( const QVariantMap& m ) Config::setConfigurationMap( const QVariantMap& m )
{ {
m_generalPolicy = CalamaresUtils::getString( m, "policy" ); m_generalPolicy = CalamaresUtils::getString( m, "policy" );
if ( !QUrl( m_generalPolicy ).isValid() )
{
m_generalPolicy = QString();
}
emit generalPolicyChanged( m_generalPolicy ); emit generalPolicyChanged( m_generalPolicy );
} }

Loading…
Cancel
Save