Commit d40dc43d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix QNetworkAccessManager usage

parent 91c94882
......@@ -51,6 +51,9 @@ ScamExpandUrlJob::ScamExpandUrlJob(QObject *parent)
, d(new ScamExpandUrlJobPrivate)
{
d->mNetworkAccessManager = new QNetworkAccessManager(this);
d->mNetworkAccessManager->setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy);
d->mNetworkAccessManager->setStrictTransportSecurityEnabled(true);
d->mNetworkAccessManager->enableStrictTransportSecurityStore(true);
connect(d->mNetworkAccessManager, &QNetworkAccessManager::finished, this,
&ScamExpandUrlJob::slotExpandFinished);
......
......@@ -46,6 +46,10 @@ CheckPhishingUrlJob::CheckPhishingUrlJob(QObject *parent)
, d(new WebEngineViewer::CheckPhishingUrlJobPrivate)
{
d->mNetworkAccessManager = new QNetworkAccessManager(this);
d->mNetworkAccessManager->setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy);
d->mNetworkAccessManager->setStrictTransportSecurityEnabled(true);
d->mNetworkAccessManager->enableStrictTransportSecurityStore(true);
connect(d->mNetworkAccessManager, &QNetworkAccessManager::finished, this, &CheckPhishingUrlJob::slotCheckUrlFinished);
connect(d->mNetworkAccessManager, &QNetworkAccessManager::sslErrors, this, &CheckPhishingUrlJob::slotSslErrors);
}
......
......@@ -56,6 +56,10 @@ CreatePhishingUrlDataBaseJob::CreatePhishingUrlDataBaseJob(QObject *parent)
, d(new CreatePhishingUrlDataBaseJobPrivate)
{
d->mNetworkAccessManager = new QNetworkAccessManager(this);
d->mNetworkAccessManager->setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy);
d->mNetworkAccessManager->setStrictTransportSecurityEnabled(true);
d->mNetworkAccessManager->enableStrictTransportSecurityStore(true);
connect(d->mNetworkAccessManager, &QNetworkAccessManager::finished, this, &CreatePhishingUrlDataBaseJob::slotDownloadDataBaseFinished);
connect(d->mNetworkAccessManager, &QNetworkAccessManager::sslErrors, this, &CreatePhishingUrlDataBaseJob::slotSslErrors);
}
......
......@@ -50,6 +50,10 @@ SearchFullHashJob::SearchFullHashJob(QObject *parent)
, d(new SearchFullHashJobPrivate)
{
d->mNetworkAccessManager = new QNetworkAccessManager(this);
d->mNetworkAccessManager->setRedirectPolicy(QNetworkRequest::NoLessSafeRedirectPolicy);
d->mNetworkAccessManager->setStrictTransportSecurityEnabled(true);
d->mNetworkAccessManager->enableStrictTransportSecurityStore(true);
connect(d->mNetworkAccessManager, &QNetworkAccessManager::finished, this, &SearchFullHashJob::slotCheckUrlFinished);
connect(d->mNetworkAccessManager, &QNetworkAccessManager::sslErrors, this, &SearchFullHashJob::slotSslErrors);
}
......
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