[Pkg-owncloud-commits] [owncloud-client] 95/159: Discovery: Add a sanity check when results are parsed

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri May 1 13:05:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 0634a4d0c6eec0ff14f1c9df4d72f73ad809250d
Author: Markus Goetz <markus at woboq.com>
Date:   Mon Apr 13 15:10:04 2015 +0200

    Discovery: Add a sanity check when results are parsed
---
 src/libsync/discoveryphase.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp
index b8c580a..9c36c12 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();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list