Skip to content

Commit be3d71c

Browse files
mbgonicusMik-
authored andcommitted
fix: ignore verification ssl errors if verifyServer=false (#453)
1 parent 526445b commit be3d71c

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

resources/conan/recipes/qtwebdav/all/patches/ssl-certificates.patch

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/qwebdav.cpp b/qwebdav.cpp
2-
index 091500d..98d7b59 100644
2+
index 091500d..558c475 100644
33
--- a/qwebdav.cpp
44
+++ b/qwebdav.cpp
55
@@ -160,6 +160,16 @@ void QWebdav::acceptSslCertificate(const QString &sslCertDigestMd5,
@@ -19,7 +19,7 @@ index 091500d..98d7b59 100644
1919
void QWebdav::replyReadyRead()
2020
{
2121
auto reply = qobject_cast<QNetworkReply*>(QObject::sender());
22-
@@ -263,6 +273,30 @@ void QWebdav::sslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
22+
@@ -263,6 +273,32 @@ void QWebdav::sslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
2323
{
2424
// user accepted this SSL certifcate already ==> ignore SSL errors
2525
reply->ignoreSslErrors();
@@ -46,11 +46,13 @@ index 091500d..98d7b59 100644
4646
+ return;
4747
+ }
4848
+ }
49+
+
50+
+ reply->ignoreSslErrors();
4951
+
5052
} else {
5153
// user has to check the SSL certificate and has to accept manually
5254
emit checkSslCertifcate(errors);
53-
@@ -692,9 +726,22 @@ QNetworkReply* QWebdav::remove(const QString& path)
55+
@@ -692,9 +728,22 @@ QNetworkReply* QWebdav::remove(const QString& path)
5456
return createRequest("DELETE", req);
5557
}
5658

resources/flatpak/patches/qtwebdav-ssl-certificates.patch

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/qwebdav.cpp b/qwebdav.cpp
2-
index 091500d..98d7b59 100644
2+
index 091500d..558c475 100644
33
--- a/qwebdav.cpp
44
+++ b/qwebdav.cpp
55
@@ -160,6 +160,16 @@ void QWebdav::acceptSslCertificate(const QString &sslCertDigestMd5,
@@ -19,7 +19,7 @@ index 091500d..98d7b59 100644
1919
void QWebdav::replyReadyRead()
2020
{
2121
auto reply = qobject_cast<QNetworkReply*>(QObject::sender());
22-
@@ -263,6 +273,30 @@ void QWebdav::sslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
22+
@@ -263,6 +273,32 @@ void QWebdav::sslErrors(QNetworkReply *reply, const QList<QSslError> &errors)
2323
{
2424
// user accepted this SSL certifcate already ==> ignore SSL errors
2525
reply->ignoreSslErrors();
@@ -46,11 +46,13 @@ index 091500d..98d7b59 100644
4646
+ return;
4747
+ }
4848
+ }
49+
+
50+
+ reply->ignoreSslErrors();
4951
+
5052
} else {
5153
// user has to check the SSL certificate and has to accept manually
5254
emit checkSslCertifcate(errors);
53-
@@ -692,9 +726,22 @@ QNetworkReply* QWebdav::remove(const QString& path)
55+
@@ -692,9 +728,22 @@ QNetworkReply* QWebdav::remove(const QString& path)
5456
return createRequest("DELETE", req);
5557
}
5658

0 commit comments

Comments
 (0)