summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2016-08-08 21:29:09 +1000
committerDavid Tardon <dtardon@redhat.com>2016-08-10 07:35:32 +0000
commit1b482aec4e7b6aec86fb20bcda555c4060a80332 (patch)
tree71b37567d3bc903cc6747f595d345982f8cd1c04 /ucb
parentecc43f06a94587e8808c7edf73eae23e5243dc85 (diff)
tdf#101385: don't try to get SharePoint folder outside of allowed range
for a given site. This patch uses the fact that getFolderByServerRelativeUrl API returns site's root folder if used with empty path (''). Hopefully this isn't otherwise context-dependent, so that it doesn't return other folders in some unknown circumstances. More correct would be instead to use the site's root path directly, like '/sites/mysite'. But I don't know a reliable way to filter the API part from the base URI. To make use of the corrected SharePoint repository root id, the patch also redirects all cases where "/" object is queried, to session's getRootFolder(). libcmis part of the patch will hopefully soon be merged upstream. Change-Id: I0f3b9930748de3fe4763eb27721739f097b9892d Reviewed-on: https://gerrit.libreoffice.org/27987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 5dd9951402f1..56853fd43d94 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -522,7 +522,7 @@ namespace cmis
throw libcmis::Exception( "Object not found" );
}
}
- else if ( !m_sObjectPath.isEmpty( ) )
+ else if (!(m_sObjectPath.isEmpty() || m_sObjectPath == "/"))
{
try
{