Bug 101385 - CMIS: SharePoint 2013 type cannot be used for SharePoint 2013 site
Summary: CMIS: SharePoint 2013 type cannot be used for SharePoint 2013 site
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:5.3.0 target:5.2.1
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-08 11:56 UTC by Mike Kaganski
Modified: 2016-10-03 10:21 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2016-08-08 11:56:04 UTC
In "Add Service" CMIS dialog, if "SharePoint 2013" type is chosen,
http://<server>/sites/<mysite>/_api/Web is put to "Host", user/password is set, SharePoint is selected as Repository, and Root is left empty to start in site's root folder (it internally becomes "/"), then trying to use the newly-added service results in "General I/O error" (before Bug 100783, it crashed).

This is because SharePoint repository uses getFolderByServerRelativeUrl API, that expects **server-relative** paths, and "/" isn't in allowed range of paths for <mysite>: its folders are subfolders of "/sites/<mysite>/". It is possible to enter this into the "Root" input box in "Add Service" dialog, and the service will work; but in this case, it will be possible to go to parent folder by using links in "Remote Files" dialog, so that the error will happen again.

I'm going to provide a patch that will avoid using root paths outside of allowed range for a given site.
Comment 1 Mike Kaganski 2016-08-08 12:08:36 UTC
A patch submitted to gerrit: https://gerrit.libreoffice.org/27987
Comment 2 Mike Kaganski 2016-08-08 21:25:09 UTC
See libcmis upstream issue: https://github.com/tdf/libcmis/issues/10
Comment 3 Commit Notification 2016-08-10 07:36:59 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1b482aec4e7b6aec86fb20bcda555c4060a80332

tdf#101385: don't try to get SharePoint folder outside of allowed range

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2016-08-10 10:08:51 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=027227f5f7672f30a45b17d4f5d12e66eb36876b&h=libreoffice-5-2

tdf#101385: don't try to get SharePoint folder outside of allowed range

It will be available in 5.2.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Julien Nabet 2016-08-20 15:35:45 UTC
I put ASSIGNED but perhaps we may consider this one as FIXED now?
Comment 6 Xisco Faulí 2016-09-26 11:37:39 UTC
Hello Mike,
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?