{"action":"created","issue":{"url":"https://api.github.com/repos/fruux/sabre-dav/issues/935","repository_url":"https://api.github.com/repos/fruux/sabre-dav","labels_url":"https://api.github.com/repos/fruux/sabre-dav/issues/935/labels{/name}","comments_url":"https://api.github.com/repos/fruux/sabre-dav/issues/935/comments","events_url":"https://api.github.com/repos/fruux/sabre-dav/issues/935/events","html_url":"https://github.com/fruux/sabre-dav/issues/935","id":202206624,"number":935,"title":"macOS Calendar gets 403 response for PROPPATCH and stops after that","user":{"login":"felixkiss","id":256075,"avatar_url":"https://avatars.githubusercontent.com/u/256075?v=3","gravatar_id":"","url":"https://api.github.com/users/felixkiss","html_url":"https://github.com/felixkiss","followers_url":"https://api.github.com/users/felixkiss/followers","following_url":"https://api.github.com/users/felixkiss/following{/other_user}","gists_url":"https://api.github.com/users/felixkiss/gists{/gist_id}","starred_url":"https://api.github.com/users/felixkiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixkiss/subscriptions","organizations_url":"https://api.github.com/users/felixkiss/orgs","repos_url":"https://api.github.com/users/felixkiss/repos","events_url":"https://api.github.com/users/felixkiss/events{/privacy}","received_events_url":"https://api.github.com/users/felixkiss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-20T18:12:48Z","updated_at":"2017-01-28T17:22:44Z","closed_at":null,"body":"I use `sabre/dav` in my project to build a read-only CalDAV interface to the data of my web application.\r\n\r\nSabre version: 3.2.0\r\n\r\nThe following parts are custom, implemented by my application:\r\n - `CustomAuthBackend` extending `Sabre\\DAV\\Auth\\Backend\\AbstractBasic`\r\n - `CustomPrincipalBackend` implementing `Sabre\\DAVACL\\PrincipalBackend\\BackendInterface`\r\n - `CustomCalendarBackend` implementing `Sabre\\CalDAV\\Backend\\BackendInterface`\r\n\r\nI have the following plugins activated:\r\n - `Sabre\\DAV\\Auth\\Plugin`\r\n - `Sabre\\CalDAV\\Plugin`\r\n - `Sabre\\DAVACL\\Plugin`\r\n - `Sabre\\DAV\\Browser\\Plugin`\r\n\r\nCalDAV works fine with iOS and Android devices, but now I have tested with macOS' Calendar.app and I can't get it to download the events.\r\n\r\nThe following happens (observed in Charles Proxy):\r\n\r\n1) `PROPFIND /caldav/calendars/felixkiss/` => returns 401\r\n2) `PROPFIND /caldav/calendars/felixkiss/` (with Auth header) => returns \r\n\r\n```\r\n<d:multistatus xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\" xmlns:cal=\"urn:ietf:params:xml:ns:caldav\" xmlns:cs=\"http://calendarserver.org/ns/\"> \r\n\t<d:response> \r\n\t\t<d:href>/caldav/calendars/felixkiss/</d:href> \r\n\t\t<d:propstat> \r\n\t\t\t<d:prop> \r\n\t\t\t\t<d:current-user-privilege-set> \r\n\t\t\t\t\t<d:privilege> \r\n\t\t\t\t\t\t<d:write /> \r\n\t\t\t\t\t</d:privilege> \r\n\t\t\t\t\t<d:privilege> \r\n\t\t\t\t\t\t<d:write-properties /> \r\n\t\t\t\t\t</d:privilege> \r\n\t\t\t\t\t<d:privilege> \r\n\t\t\t\t\t\t<d:write-content /> \r\n\t\t\t\t\t</d:privilege> \r\n\t\t\t\t\t<d:privilege> \r\n\t\t\t\t\t\t<d:unlock /> \r\n\t\t\t\t\t</d:privilege> \r\n\t\t\t\t\t<d:privilege> \r\n\t\t\t\t\t\t<d:bind /> \r\n\t\t\t\t\t</d:privilege> \r\n\t\t\t\t\t<d:privilege> \r\n\t\t\t\t\t\t<d:unbind /> \r\n\t\t\t\t\t</d:privilege> \r\n\t\t\t\t\t<d:privilege> \r\n\t\t\t\t\t\t<d:write-acl /> \r\n\t\t\t\t\t</d:privilege> \r\n\t\t\t\t\t<d:privilege> \r\n\t\t\t\t\t\t<d:read /> \r\n\t\t\t\t\t</d:privilege> \r\n\t\t\t\t\t<d:privilege> \r\n\t\t\t\t\t\t<d:read-acl /> \r\n\t\t\t\t\t</d:privilege> \r\n\t\t\t\t\t<d:privilege> \r\n\t\t\t\t\t\t<d:read-current-user-privilege-set /> \r\n\t\t\t\t\t</d:privilege> \r\n\t\t\t\t</d:current-user-privilege-set> \r\n\t\t\t\t<d:owner> \r\n\t\t\t\t\t<d:href>/caldav/principals/felixkiss/</d:href> \r\n\t\t\t\t</d:owner> \r\n\t\t\t\t<d:resourcetype> \r\n\t\t\t\t\t<d:collection /> \r\n\t\t\t\t</d:resourcetype> \r\n\t\t\t\t<d:supported-report-set> \r\n\t\t\t\t\t<d:supported-report> \r\n\t\t\t\t\t\t<d:report> \r\n\t\t\t\t\t\t\t<d:expand-property /> \r\n\t\t\t\t\t\t</d:report> \r\n\t\t\t\t\t</d:supported-report> \r\n\t\t\t\t\t<d:supported-report> \r\n\t\t\t\t\t\t<d:report> \r\n\t\t\t\t\t\t\t<d:principal-match /> \r\n\t\t\t\t\t\t</d:report> \r\n\t\t\t\t\t</d:supported-report> \r\n\t\t\t\t\t<d:supported-report> \r\n\t\t\t\t\t\t<d:report> \r\n\t\t\t\t\t\t\t<d:principal-property-search /> \r\n\t\t\t\t\t\t</d:report> \r\n\t\t\t\t\t</d:supported-report> \r\n\t\t\t\t\t<d:supported-report> \r\n\t\t\t\t\t\t<d:report> \r\n\t\t\t\t\t\t\t<d:principal-search-property-set /> \r\n\t\t\t\t\t\t</d:report> \r\n\t\t\t\t\t</d:supported-report> \r\n\t\t\t\t</d:supported-report-set> \r\n\t\t\t</d:prop> \r\n\t\t\t<d:status>HTTP/1.1 200 OK</d:status> \r\n\t\t</d:propstat> \r\n\t</d:response> \r\n</d:multistatus>\r\n```\r\n\r\n3) `PROPPATCH /caldav/calendars/felixkiss/`\r\n\r\nRequest:\r\n```\r\nPROPPATCH /caldav/calendars/felixkiss/ HTTP/1.1\r\nContent-Type: text/xml\r\nAuthorization: Basic ZmVsaXhraXNzOmZlbGl4\r\nConnection: keep-alive\r\nAccept: */*\r\nUser-Agent: Mac+OS+X/10.12.2 (16C67) CalendarAgent/384\r\nContent-Length: 425\r\nAccept-Language: en-us\r\nAccept-Encoding: gzip, deflate\r\n\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<A:propertyupdate xmlns:A=\"DAV:\"><A:set><A:prop><B:default-alarm-vevent-date xmlns:B=\"urn:ietf:params:xml:ns:caldav\">BEGIN:VALARM&#13;\r\nX-WR-ALARMUID:CC59F3F7-020D-42BA-AA37-3EFD07055D32&#13;\r\nUID:CC59F3F7-020D-42BA-AA37-3EFD07055D32&#13;\r\nTRIGGER:-PT15H&#13;\r\nATTACH;VALUE=URI:Basso&#13;\r\nACTION:AUDIO&#13;\r\nEND:VALARM&#13;\r\n</B:default-alarm-vevent-date></A:prop></A:set></A:propertyupdate>\r\n```\r\n\r\nResponse:\r\n```\r\nHTTP/1.1 207 Multi-Status\r\nCache-Control: no-cache\r\nContent-Type: application/xml; charset=utf-8\r\nDate: Fri, 20 Jan 2017 17:54:53 GMT\r\nServer: Caddy\r\nStatus: 207 Multi-Status\r\nVary: Brief,Prefer\r\nX-Powered-By: PHP/7.0.14\r\nX-Sabre-Version: 3.2.0\r\nContent-Length: 402\r\nConnection: Keep-alive\r\n\r\n<?xml version=\"1.0\"?>\r\n<d:multistatus xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\" xmlns:cal=\"urn:ietf:params:xml:ns:caldav\" xmlns:cs=\"http://calendarserver.org/ns/\">\r\n <d:response>\r\n  <d:href>/caldav/calendars/felixkiss</d:href>\r\n  <d:propstat>\r\n   <d:prop>\r\n    <cal:default-alarm-vevent-date/>\r\n   </d:prop>\r\n   <d:status>HTTP/1.1 403 Forbidden</d:status>\r\n  </d:propstat>\r\n </d:response>\r\n</d:multistatus>\r\n```\r\n\r\n4) Another `PROPPATCH` similar to 3), but with `default-alarm-vevent-datetime` instead of `default-alarm-vevent-date`\r\n\r\n5) `REPORT /caldav/principals/felixkiss/` => return 401\r\n6) `REPORT /caldav/principals/felixkiss/` (with Auth header) => returns \r\n\r\n```\r\nHTTP/1.1 207 Multi-Status\r\nCache-Control: no-cache\r\nContent-Type: application/xml; charset=utf-8\r\nDate: Fri, 20 Jan 2017 17:54:53 GMT\r\nServer: Caddy\r\nStatus: 207 Multi-Status\r\nX-Powered-By: PHP/7.0.14\r\nX-Sabre-Version: 3.2.0\r\nContent-Length: 429\r\nConnection: Keep-alive\r\n\r\n<?xml version=\"1.0\"?>\r\n<d:multistatus xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\" xmlns:cal=\"urn:ietf:params:xml:ns:caldav\" xmlns:cs=\"http://calendarserver.org/ns/\">\r\n <d:response>\r\n  <d:href>/caldav/principals/felixkiss/</d:href>\r\n  <d:propstat>\r\n   <d:prop>\r\n    <cs:calendar-proxy-read-for/>\r\n    <cs:calendar-proxy-write-for/>\r\n   </d:prop>\r\n   <d:status>HTTP/1.1 200 OK</d:status>\r\n  </d:propstat>\r\n </d:response>\r\n</d:multistatus>\r\n```\r\n\r\n---\r\n\r\nWhat I have tried:\r\n - I thought if request 2) would not return any `write` privileges, the client wouldn't try to set `default-alarm-vevent-date` in the first place, but a custom ACL plugin that only featured the `{DAV:}read` privileges did nothing\r\n - I searched through all interfaces that I implement myself but couldn't find anything I thought was related.\r\n\r\nAny ideas or hints where I can continue debugging?"},"comment":{"url":"https://api.github.com/repos/fruux/sabre-dav/issues/comments/275861198","html_url":"https://github.com/fruux/sabre-dav/issues/935#issuecomment-275861198","issue_url":"https://api.github.com/repos/fruux/sabre-dav/issues/935","id":275861198,"user":{"login":"evert","id":178960,"avatar_url":"https://avatars.githubusercontent.com/u/178960?v=3","gravatar_id":"","url":"https://api.github.com/users/evert","html_url":"https://github.com/evert","followers_url":"https://api.github.com/users/evert/followers","following_url":"https://api.github.com/users/evert/following{/other_user}","gists_url":"https://api.github.com/users/evert/gists{/gist_id}","starred_url":"https://api.github.com/users/evert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evert/subscriptions","organizations_url":"https://api.github.com/users/evert/orgs","repos_url":"https://api.github.com/users/evert/repos","events_url":"https://api.github.com/users/evert/events{/privacy}","received_events_url":"https://api.github.com/users/evert/received_events","type":"User","site_admin":false},"created_at":"2017-01-28T17:22:44Z","updated_at":"2017-01-28T17:22:44Z","body":"Hi @felixkiss ,\r\n\r\nCan you try enabling a `PropertyStorage` plugin and try again? The 403 ideally shouldn't be a problem, but maybe something changed in the latest OS X.\r\n\r\nThe easiest is to enable it with the PDO backend for  testing:\r\n\r\nhttp://sabre.io/dav/property-storage/\r\n\r\nIt's a _really good idea_ to have this enabled regardless. It will make many clients a bit better.\r\n\r\ncc: @DominikTo "}}
{"actor":{"display_login":"evert"}}