From: Kevin Ottens Date: Thu, 18 Jun 2020 11:34:47 +0000 (+0200) Subject: Ensure GetFolderEncryptStatusJob gets all the folders X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~130^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3db267a03b74a3ddb8a525d239e3003620919f50;p=nextcloud-desktop.git Ensure GetFolderEncryptStatusJob gets all the folders We ensure the PROPFIND Depth is infinity by explicitly specifying the header (turns out our implementation just doesn't assume infinity otherwise). This way we have a clear picture about *all* the folders of the user, otherwise ClientSideEncryption couldn't be a trustable oracle on the encryption state for any folder not on the root and all the encryption code assumes it has a full picture of encryption. Signed-off-by: Kevin Ottens --- diff --git a/src/libsync/clientsideencryptionjobs.cpp b/src/libsync/clientsideencryptionjobs.cpp index 5c8876206..707612413 100644 --- a/src/libsync/clientsideencryptionjobs.cpp +++ b/src/libsync/clientsideencryptionjobs.cpp @@ -35,6 +35,7 @@ void GetFolderEncryptStatusJob::start() req.setPriority(QNetworkRequest::HighPriority); req.setRawHeader("OCS-APIREQUEST", "true"); req.setHeader(QNetworkRequest::ContentTypeHeader, QByteArrayLiteral("application/xml")); + req.setRawHeader("Depth", "infinity"); QByteArray xml = R"( )"; auto *buf = new QBuffer(this);