From: Matthieu Gallien Date: Thu, 25 Nov 2021 15:49:20 +0000 (+0100) Subject: really check that this is a valid answer when receiving batch upload X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~18^2~83^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a272b3480935d8ddebef45d87b03248565f4d4d0;p=nextcloud-desktop.git 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 --- 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);