From: Markus Goetz Date: Mon, 13 Apr 2015 13:10:04 +0000 (+0200) Subject: Discovery: Add a sanity check when results are parsed X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1803^2~203 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0634a4d0c6eec0ff14f1c9df4d72f73ad809250d;p=nextcloud-desktop.git Discovery: Add a sanity check when results are parsed --- diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index b8c580a12..9c36c1286 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -285,6 +285,13 @@ void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(QString file,QMap void DiscoverySingleDirectoryJob::lsJobFinishedWithoutErrorSlot() { + if (!_ignoredFirst) { + // This is a sanity check, if we haven't _ignoredFirst then it means we never received any directoryListingIteratedSlot + // which means somehow the server XML was bogus + emit finishedWithError(ERRNO_WRONG_CONTENT, QLatin1String("Server error: PROPFIND reply is not XML formatted!")); + deleteLater(); + return; + } emit etagConcatenation(_etagConcatenation); emit finishedWithResult(_results); deleteLater();