mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 21:46:03 +03:00
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 <kevin.ottens@nextcloud.com>
This commit is contained in:
parent
f93fdafa80
commit
3db267a03b
1 changed files with 1 additions and 0 deletions
|
@ -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"(<d:propfind xmlns:d="DAV:"> <d:prop xmlns:nc="http://nextcloud.org/ns"> <nc:is-encrypted/> </d:prop> </d:propfind>)";
|
||||
auto *buf = new QBuffer(this);
|
||||
|
|
Loading…
Reference in a new issue