[Pkg-owncloud-commits] [owncloud-client] 81/121: Only accept notification API Capability if endpoint is OCS-enabled

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Jul 28 15:32:00 UTC 2016


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 8a1a2eb5b309b2152b20576c877c8230ecbfc936
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Mon Jul 4 18:30:13 2016 +0200

    Only accept notification API Capability if endpoint is OCS-enabled
    
    Fixes #5033
---
 src/libsync/capabilities.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/libsync/capabilities.cpp b/src/libsync/capabilities.cpp
index 7e4ff52..ca72a70 100644
--- a/src/libsync/capabilities.cpp
+++ b/src/libsync/capabilities.cpp
@@ -73,7 +73,8 @@ bool Capabilities::shareResharing() const
 
 bool Capabilities::notificationsAvailable() const
 {
-    return _capabilities.contains("notifications");
+    // We require the OCS style API in 9.x, can't deal with the REST one only found in 8.2
+    return _capabilities.contains("notifications") && _capabilities["notifications"].toMap().contains("ocs-endpoints");
 }
 
 bool Capabilities::isValid() const

-- 
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