XBEL sync not working with owncloud (Origin header=null)
See original GitHub issueSoftware versions
- Browser: Chrome 69.0.3497.42 beta (64-bit)
- Owncloud: 10.0.9 @ my.domain.tld/my_prefix
- Floccus: 3.0.2
Sync settings
WebDAV URL: https://my.domain.tld/my_prefix/remote.php/webdav/ Bookmarks file path: bookmarks.xbel
Steps to reproduce
- installed
- setup
- tried syncing
Expected outcome
bookmarks.xbel should have been saved
Actual outcome
bookmarks.xbel was not saved
Initially I created an empty bookmarks.xbel on my server and the sync would halt due to Account.js:171 Syncing failed with Cannot read property 'childNodes' of undefined
. This indicates read access is working with my settings, only the file was invalid.
Then I removed it, and I now see log messages for bookmark parsing (COMPARE, CREATE etc)
However, the process fails at PUT/DELETE requests for bookmarks.xbel and bookmarks.xbel.lock with HTTP500.
Example log from my owncloud instance:
{
"reqId":"W4EWHcKHVXsAAD7no0AAAAAG",
"level":3,
"time":"2018-08-25T08:41:01+00:00",
"remoteAddr":"<censored>",
"user":"--",
"app":"remote",
"method":"PUT",
"url":"\/my_prefix\/remote.php\/webdav\/bookmarks.xbel.lock",
"message":"Exception: {\"Exception\":\"InvalidArgumentException\",
\"Message\":\"Invalid url "null"\",\"Code\":0,
\"Trace\":\"#0 /lib/public/Util.php(809):
OCP\Util::getFullDomain('null')
#1 /apps/dav/lib/Connector/Sabre/CorsPlugin.php(98): OCP\Util::isSameDomain('null', 'https://my.domain....')
#2 /lib/composer/sabre/dav/lib/DAV/Server.php(407): OCA\DAV\Connector\Sabre\CorsPlugin->initialize(Object(OCA\DAV\Connector\Sabre\Server))
#3 /apps/dav/lib/Connector/Sabre/ServerFactory.php(105): Sabre\DAV\Server->addPlugin(Object(OCA\DAV\Connector\Sabre\CorsPlugin))
#4 /apps/dav/appinfo/v1/webdav.php(57): OCA\DAV\Connector\Sabre\ServerFactory->createServer('/my_prefix/remote...', '/my_prefix/remote...', Object(OCA\DAV\Connector\Sabre\Auth), Object(Closure))
#5 /remote.php(165): require_once('...')
#6 {main}\",\"File\":\"/lib/public/Util.php\",\"Line\":775}"
}
Looking at this @ the source: https://github.com/owncloud/core/blob/d5836485ac9802db343b6c9eed986a24b50eb072/apps/dav/lib/Connector/Sabre/CorsPlugin.php#L98
It seems owncloud expects the Origin header to be missing or parsable, but null
isn’t.
AFAIK, it is impossible to set with fetch since it’s CORS-related 😦
Can this be solved on your end or do I need to file this on their repo?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
nevermind, it’s already fixed @ owncloud/core#32120 😄
I was not able to remove Origin header in chrome.
Firefox is sending
moz-extension://fe404075-445f-4b57-8f4b-0a96fe99639c
as originThis fails as well with “Only http based URLs supported”.
I will file a bug report @ owncloud