Validate the providers ssl certificate
authorFelix Weilbach <felix.weilbach@nextcloud.com>
Wed, 10 Feb 2021 08:53:57 +0000 (09:53 +0100)
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>
Fri, 12 Feb 2021 08:25:59 +0000 (08:25 +0000)
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
src/gui/wizard/webview.cpp

index e03f8650965c092d7ba5558846b458e3125ed8cd..6c2207f486805e23dde4bea5d22f601dbf4139f2 100644 (file)
@@ -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.