From 142180c0e297ef500daf8328e7ea3020e33a3639 Mon Sep 17 00:00:00 2001
From: Felix Weilbach <felix.weilbach@nextcloud.com>
Date: Wed, 10 Feb 2021 09:53:57 +0100
Subject: [PATCH] Validate the providers ssl certificate

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
---
 src/gui/wizard/webview.cpp | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/gui/wizard/webview.cpp b/src/gui/wizard/webview.cpp
index e03f86509..6c2207f48 100644
--- a/src/gui/wizard/webview.cpp
+++ b/src/gui/wizard/webview.cpp
@@ -52,9 +52,6 @@ public:
 
 protected:
     bool certificateError(const QWebEngineCertificateError &certificateError) override;
-
-private:
-    QUrl _rootUrl;
 };
 
 // We need a separate class here, since we cannot simply return the same WebEnginePage object
@@ -191,15 +188,10 @@ QWebEnginePage * WebEnginePage::createWindow(QWebEnginePage::WebWindowType type)
 
 void WebEnginePage::setUrl(const QUrl &url) {
     QWebEnginePage::setUrl(url);
-    _rootUrl = url;
 }
 
-bool WebEnginePage::certificateError(const QWebEngineCertificateError &certificateError) {
-    if (certificateError.error() == QWebEngineCertificateError::CertificateAuthorityInvalid &&
-        certificateError.url().host() == _rootUrl.host()) {
-        return true;
-    }
-
+bool WebEnginePage::certificateError(const QWebEngineCertificateError &certificateError)
+{
     /**
      * TODO properly improve this.
      * The certificate should be displayed.
-- 
2.33.0

