From a272b3480935d8ddebef45d87b03248565f4d4d0 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 25 Nov 2021 16:49:20 +0100 Subject: [PATCH] really check that this is a valid answer when receiving batch upload we could somehow miss that the reply is missing proper fields Signed-off-by: Matthieu Gallien --- src/libsync/bulkpropagatorjob.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/bulkpropagatorjob.cpp b/src/libsync/bulkpropagatorjob.cpp index 2d5362a94..f6ab1ff3a 100644 --- a/src/libsync/bulkpropagatorjob.cpp +++ b/src/libsync/bulkpropagatorjob.cpp @@ -307,7 +307,7 @@ void BulkPropagatorJob::slotPutFinishedOneFile(const BulkUploadItem &singleFile, qCInfo(lcBulkPropagatorJob()) << singleFile._item->_file << "file headers" << fileReply; - if (!fileReply[QStringLiteral("error")].toBool()) { + if (fileReply.contains("error") && !fileReply[QStringLiteral("error")].toBool()) { singleFile._item->_httpErrorCode = static_cast(200); } else { singleFile._item->_httpErrorCode = static_cast(412); -- 2.30.2