mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
33 lines
1.4 KiB
Diff
33 lines
1.4 KiB
Diff
From 63cf5d3d26a6f65938c3cdec1734eac9faaaf8cb Mon Sep 17 00:00:00 2001
|
|
From: Markus Goetz <markus@woboq.com>
|
|
Date: Tue, 22 Sep 2015 14:26:24 -0400
|
|
Subject: [PATCH] QNAM: Assign proper channel before sslErrors() emission
|
|
|
|
There can be a race condition where another channel connects
|
|
and gets the sslErrors() from the socket first. Then the
|
|
QSslConfiguration from the wrong socket (the default
|
|
channel 0's socket) was used.
|
|
|
|
Task-number: QTBUG-18722
|
|
Change-Id: Ibbfa48c27f181563745daf540fa792a57cc09682
|
|
Reviewed-by: Richard J. Moore <rich@kde.org>
|
|
---
|
|
src/network/access/qhttpnetworkconnectionchannel.cpp | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
|
|
index 257aa13..477cba2 100644
|
|
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
|
|
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
|
|
@@ -1066,6 +1066,8 @@ void QHttpNetworkConnectionChannel::_q_sslErrors(const QList<QSslError> &errors)
|
|
connection->d_func()->pauseConnection();
|
|
if (pendingEncrypt && !reply)
|
|
connection->d_func()->dequeueRequest(socket);
|
|
+ if (reply) // a reply was actually dequeued.
|
|
+ reply->d_func()->connectionChannel = this; // set correct channel like in sendRequest() and queueRequest();
|
|
if (connection->connectionType() == QHttpNetworkConnection::ConnectionTypeHTTP) {
|
|
if (reply)
|
|
emit reply->sslErrors(errors);
|
|
--
|
|
1.9.1
|
|
|