145 Commits

Author SHA1 Message Date
Florian Schlichting
4b7abbbd83 drop default $position argument from BuildXMLTree everywhere (awl!22) 2023-02-26 22:10:34 +01:00
Andrew Ruthven
0da12be223 Stop caching bound collections.
This was causing binding/1038-PROPFIND-Depth-2 to fail as the getctag that
was found didn't match what was expected. Looking at how bound collections
are handled, there is a lot of metadata that we're missing.

Preferably we'd cache or otherwise restore that metadata, but I'm going
to leave that as a future enhancement. ;)
2023-01-18 00:11:57 +13:00
Andrew Ruthven
0cb7381c88 Keep track of proxy information for a Collection when using memcached
The test regression-suite/0549-iCal-REPORT was failing due to us not
keeping track of the proxy information when storing/fetching collections
from the cache.
2023-01-18 00:11:57 +13:00
Andrew Ruthven
aab8ddfd30 Ensure that all fields are defined, not added dynamically.
PHP 8.2 deprecates dynmically adding properties. See:
  https://php.watch/versions/8.2/dynamic-properties-deprecated
2022-12-10 14:37:31 +13:00
Andrew Ruthven
02af0c58ee Further fixes for PHP 8.1
I don't know why this only show up in the gitlab runners. I have PHP 8.1
locally.
2022-02-13 01:04:47 +13:00
Andrew Ruthven
bcdf59ae2e Merge branch 'JJJollyjim/davical-refactor-freebusy' 2019-01-04 22:37:25 +13:00
Jamie McClymont
c4321dac9f Fix excessive SQL queries in calendar-sync REPORT
The calendar-sync REPORT fetches the collection as a DAVResource, then
instantiates a DAVResource for each event in the collection.

Unfortunately, ByRow in DAVResource fetches the resource's collection from the
database!

This commit populates each DAVResource's collection field with the
already-fetched collection when performing calendar-sync queries.
2019-01-04 14:13:41 +13:00
Jamie McClymont
a2b393317d Populate first_instance_start and last_instance_end on resource write 2019-01-03 17:48:42 +13:00
Florian Schlichting
c21313d05e Merge branch 'fix_max_carddav_resource_size' into 'master'
Introduce new global variable to control maximum size of carddav resources.

See merge request davical-project/davical!53
2018-12-21 22:43:53 +00:00
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
c5891abc7f Introduce new global variable to control maximum size of carddav resources. 2018-08-30 17:23:12 +02: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