Commit Graph
135 Commits
Author SHA1 Message Date
Jamie McClymont 0e0a07eb30 Fix returning dead properties in an allprop PROPFIND
dead_properties is an assoc.array from name to value, but it was being merged
with simple arrays of property names.

This means that tests 0824 and 0828 now actually return the dead properties, so
I've updated those result files.

Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz>
2018-11-30 15:59:04 +13:00
Paul Kallnbach 9a430130d8 increase maximum resource size to infinity. this might be potentially dangerous but it is what's claimed in inc/caldav-MKCOL.php:
case 'urn:ietf:params:xml:ns:caldav:max-resource-size':  /** Ignored, since we will support arbitrary size */
this solves issue #80 (large contact photos not being accepted by the server). we might wanna think about a larger limit instead, e.g. increase the limit from 65kB to 6.5MB
2018-05-22 15:17:28 +00:00
wmbr fc37b68461 Fix a typo in DAV_AllProperties which caused dead properties to be omitted 2018-04-25 00:50:53 +00:00
Andrew McMillan 0966e5ce68 Tidy up some PHPdoc in DAVResource 2018-01-10 21:50:39 +00:00
Florian Schlichting 8b9b8ed244 rename DAVResource->_is_proxy_request to _is_proxy_resource 2018-01-09 22:15:29 +01:00
Florian Schlichting 17c2022122 group-member-set and group-membership queries on proxy resources should be handled in DAVResource
Otherwise we cannot be sure if the resource we are looking at is a
proxy. Looking at the request as we did in DAVPrincipal is wrong, as one
request can result in several resources to be examined, only some of
which may be proxies.

BTW looking at the regression test changes, I'm not sure having
calendar-proxy-read-for on proxy principals is correct, but caldav-proxy
seems to have nothing to say on that so we leave it for now.
2018-01-09 22:11:30 +01:00
Florian Schlichting 83e9106160 add DAVResource->IsProxyCollection() 2018-01-08 23:10:23 +01:00
Florian Schlichting a7ba436f2f advertise support for principal-match REPORT
and a few more bits inspired by CalDAV/aclreports.xml:
    - strict Depth header checking
    - principal-match: match on dav_name if not $match_self
    - principal-match can "alternatively" return resources in a collection
      that belong to a principal, like a user's calendars when we query
      the principal URI
2018-01-08 22:51:22 +01:00
Florian Schlichting eba26021c7 update doc and fix a warning 2018-01-08 22:43:27 +01:00
Florian Schlichting 63c4de9f34 do not advertise ?add_member on a principal
We wouldn't know what to do with that anyway...

Fixes the CalDAV/add-member.xml test.
2017-09-19 21:16:43 +02:00
Florian Schlichting ad763744f1 fix a typo, add a debug statement
WriteAddressbookMember doesn't exist, but as far as I can see it is only
referenced from WriteMember, which itself isn't used anywhere...
2017-01-06 15:04:59 +01:00
Florian Schlichting e7c43a0689 fix infinite loop when finding delegates (closes #48) 2017-01-04 20:52:03 +01:00
Florian Schlichting 1393c30390 migrate away from deprecated auth functions, warn more aggressively 2016-12-30 08:53:51 +01:00
Florian Schlichting 8d06163ddf less "global $foo" 2016-12-30 08:53:04 +01:00
Florian Schlichting eb7f2edc0c eliminate trailing whitespace, expand tabs 2016-12-30 08:52:44 +01:00
Florian Schlichting c510a48aaa allow BuildDeadPropertyXML to continue on namespace errors (#9) 2016-01-11 23:38:54 +01:00
Florian Schlichting 144a938923 demote stack trace to regular debug logging (cf. #42)
This code produced a stack trace every time an attendee deleted an
event from his calendar. It is not clear what bug this was meant to shed
light on.
2016-01-08 13:35:51 +01:00
Andrew Ruthven 3ca7960746 Merge branch 'fix-add-member' into 'master'
Fix add-member support for calendars

Change the add-member parameter to add_member to match the name of the global variable name. Otherwise the global variable was always unset and the generic POST handler handled the request instead of the PUT handler for vcalendars.
Make sure to return a Location header when adding a vcalendar using add-member POST.

See merge request !14
2015-05-28 10:26:18 +00:00
Marten Gajda f5dc6c669f Add component parameter to content-types headers and getcontenttype properties
This allows clients to filter the results quickly by just looking at the content-type without having to parse the calendar data.
2015-05-27 19:49:27 +02:00
Marten Gajda d99a082c24 Change the add-member parameter to add_member to match the name of the global variable name. Otherwise the global variable was always unset and the generic POST handler handled the request instead of the PUT handler for vcalendars.
Make sure to return a Location header when adding a vcalendar using add-member POST.
2015-05-27 14:32:32 +02:00
Jorge López Pérez 5d6f6b8575 Fix current-user-principal
current-user-principal should always return the principal URL for the
currently authenticated user, not the accessed resource one.
2014-11-10 14:49:32 +01:00
Ján Máté 7a05f2b7d7 fixed uninitialized principal object for calendar-proxy-* queries 2014-04-27 17:26:35 +02:00
Ján Máté 6b37b2b422 fixed masking of confidential event components 2014-03-24 01:52:52 +01:00
Andrew McMillan 04ad1ac742 Fix typo. 2013-05-28 12:54:44 +12:00
Andrew McMillan 115676613d Only certain specific namespaces actually have database columns. 2013-05-23 13:28:54 +12:00
Andrew McMillan 584a52cb70 Quick workaround for iOS6 supported-calendar-component-set issue.
Adds a $c->default_calendar_components array of (VEVENT,VTODO,...)
2012-09-20 23:37:22 +12:00
Andrew McMillan 0a435d4f22 Fix debugging to error log. 2012-09-20 23:33:52 +12:00
Andrew McMillan 274f8dfa74 Sometimes we want to retrieve the sync-token as a result of a change we just made.
This allows a (default true) flag to indicate whether it's OK to use
a previously cached value.
2012-07-29 23:17:28 +12:00
Andrew McMillan d2513bddd5 Add workaround for Apple's POST add-member trainwreck. 2012-07-13 21:54:29 +12:00
Andrew McMillan 8fb0479015 supported-calendar-component-set uses dead properties too... 2012-07-13 12:30:34 +12:00
Andrew McMillan b4fd9e2ed2 Don't just return the first element in a dead property - there might be multiple! 2012-07-13 10:45:08 +12:00
Andrew McMillan 4f81556586 Use DeconstructURL rather than rawurldecode since it strips base_name components as well. 2012-07-09 01:17:46 +12:00
Andrew McMillan 1be5cd808a Another double-encoded field... 2012-07-09 01:17:21 +12:00
Andrew McMillan 2e19bbb535 Avoid double-encoding URLs. 2012-07-09 01:17:11 +12:00
Andrew McMillan ab95a487ea Correct current-user-principal reference. 2012-07-09 01:16:37 +12:00
Andrew McMillan c09ee6ff91 Some hrefs were not properly calling ConstructURL. 2012-07-08 11:59:02 +12:00
Andrew McMillan 2c12586a42 Ensure collection_id is set after we read the row. 2012-07-08 11:58:49 +12:00
Andrew McMillan d1c2179bbb Allow a user delegated write access to the principal to maintain it. 2012-06-11 19:43:05 +12:00
Andrew McMillan b32e2cc452 Fix storing / regurgitating of XML fragments in dead properties.
Requires updated AWL to match.
2012-05-20 21:41:32 +12:00
Andrew McMillan a32d1f2ac2 Avoid unassigned variable warning. 2012-05-14 23:26:30 +12:00
Andrew McMillan 58fe06586e When matching a URL and we have something without a trailing slash, it could also be a binding. 2012-05-05 17:01:40 +12:00
Andrew McMillan 155c70bba5 Changes to the way XML is created, and (to a lesser extent) parsed. 2012-05-03 19:11:28 +12:00
Andrew McMillan 7c15051f84 Further fixes to WebDAV synchronization.
This should be fully reliable now and also cleans out all sync
changes more than one week old.  update-database is needed to pull
the new function.
2012-04-17 15:44:09 +12:00
Andrew McMillan f55f8fbee3 Allow complete disabling of handling for Apple's old calendar-proxy.
We'll make this a default behaviour after 2012 is over and remove it
sometime after that.
2012-03-22 13:52:20 +13:00
Andrew McMillan 85017681d0 More comprehensive fix for collections where sync_token does not compute. 2012-03-19 12:33:45 +13:00
Andrew McMillan f32ec4b704 Don't try and produce a sync_token for the root collection. 2012-03-19 12:31:54 +13:00
Andrew McMillan 2c40db7d7e Fix reference to collection->dav_name. 2012-03-19 12:23:12 +13:00
Andrew McMillan dfb82f9c81 Principals don't (yet) have a sync-token. 2012-03-17 21:49:28 +13:00
Andrew McMillan a96c609cb4 We should respond with sync-token if PROPFIND asks too. 2012-03-17 21:33:41 +13:00
Andrew McMillan 34cff0d299 Fix resource fetch from database. 2012-03-17 21:33:16 +13:00