2008 Commits

Author SHA1 Message Date
Andrew Ruthven
b40c96debb If time-range is set, only return matching events.
Closes #280
2023-03-12 20:19:10 +01:00
Andrew Ruthven
15d01c8bed Store DTSTART and DTEND from user in shadow columns
We want to store the calculated dtstart and dtend in the database so we can
use SQL to fetch records. However, we also need what the user sent us so we
can allow prop-filters to be used as well.

So we store what the user sends us in dtstart_orig and dtend_orig and only
use for relevant prop-filter reports.
2023-03-12 20:17:43 +01:00
Andrew Ruthven
5a73991496 DTSTART on VTODO is optional, don't force it to be set.
If we force setting DTSTART, then you can't use prop-filter to find VTODOs
with a DUE set and DTSTART unset. And, well, why should DTSTART be set to DUE?

This was introduced in 18150d702d91fa1a687801baa582d967e79fff8d .
2023-03-12 20:05:48 +01:00
Andrew Ruthven
149ec3555f CLASS is an optional field, don't set it to PUBLIC
As specified in RFC5545 the CLASS field is optional, and if it isn't present
is treated as PUBLIC. To allow a is-not-defined prop-filter to find
resources without CLASS set, we need to not store in the database. This
turns out to be okay, because to enforce privacy we always check to see if
it is PRIVATE or CONFIDENTIAL. We never check to see if it is PUBLIC.

Closes #284.
2023-03-12 20:05:48 +01:00
Andrew Ruthven
4a380b12a2 Fixes to is-defined and is-not-defined prop-filter
Gosh, this was completely broken previously. A number of different scenarios now work.

I have used some of the state I've seen in a largish production database with the
presence of NULL and empty strings. I've assumed that empty string should be treated
as is-not-defined. Happy to be talked out of that.

Closes #281.
2023-03-12 20:05:48 +01:00
Andrew Ruthven
7349944fbc Remove change entry in file, that's what git history is for 2023-03-12 20:05:48 +01:00
Piotr Filip
13c77fdcab check owner when deleting 2023-03-01 21:29:44 +01:00
Florian Schlichting
4b7abbbd83 drop default $position argument from BuildXMLTree everywhere (awl!22) 2023-02-26 22:10:34 +01:00
Andrew Ruthven
e3b5c331be Add a primary key to calendar_alarm table.
Also fixed a bug in scripts/refresh-alarms.php if there was an
alarm with a duplicate trigger.

This is part of the fix for #276.
2023-02-15 07:42:34 +00:00
Andrew Ruthven
6819d6d7d1 Add a primary_key to the addressbook_addresses_* tables
This is part of the fix for #276.
2023-02-15 07:42:34 +00:00
Andrew Ruthven
c3970f3be2 Fix RRULE for BYHOUR, BYMINUTE and BYSECOND
Closes #283.
2023-02-15 07:28:35 +00:00
Andrew Ruthven
8444347b02 We no longer support PHP 5.1, assume that DateTime is available 2023-02-15 07:28:35 +00:00
Andrew Ruthven
43996a3297 Create .in and .out calendars on principal creation.
Closes #227
2023-02-05 13:04:09 +00:00
Andrew Ruthven
0041577fc8 Handle baseDNGroups being unset. 2023-02-04 19:03:50 +13:00
Andrew Ruthven
444a098130 Ensure that groups_nothing_done is defined
Closes #278.
2023-02-04 05:48:09 +00:00
Andrew Ruthven
f86eaef5b8 Use dbg_error_log instead of dbg_log_array
Closes #277.
2023-02-04 03:21:48 +00:00
Andrew Ruthven
be60ec1778 Improve on SQL syntax fix to keep logging working, and add regression test.
Closes #279.
2023-02-04 03:09:40 +00:00
Tobias Brox
6e6ff6b115 Fix SQL syntax error if is-not-defined is used as a prop-filter. 2023-02-04 03:09:40 +00: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
7a3486563c Only cache a Principal if we've actually loaded something. 2023-01-18 00:11:57 +13:00
Andrew Ruthven
a323ba8dae Don't change the day of the month to 28, if it is > 28
Gosh. The logic was saying, if the modified date has a day of the
month > 28, change it to 28. Which is rather odd. Don't do that.

This closes #248. It also fixes a bug with FREQ=MONTHLY;BYMONTHDAY=-1
as it turns out.
2022-12-18 13:52:48 +13:00
Andrew Ruthven
6e68c221e9 Add more logging to investigate the 28th problem on issue #248
I reckon this is useful logging to have, keep it around.
2022-12-18 13:52:48 +13:00
Andrew Ruthven
7a8c7b5b25 Convert loop_limit to a config item 2022-12-15 20:50:44 +00:00
Andrew Ruthven
513db6b8d1 Remove a stray space 2022-12-15 20:50:44 +00:00
Andrew Ruthven
d93a5196b8 Increase loop limit for finding next instance for Recurrence Rules.
With complex rules, it make take more than 10 expansions to find the
next valid date. Increase this to 100, it doesn't slow things down too
much.

I've also added some additional error logging if this issue occurs
again.

Closes #268.
2022-12-15 20:50:44 +00:00
Andrew Ruthven
0fdb3ff558 Add more logging to try and find the root cause for issue 268 2022-12-15 20:50:44 +00:00
Andrew Ruthven
3909ec52f1 Convert RRule debugging to use dbg_error_log
This stops the debugging from being sent to stdout, which goes to the client and
mucks up the test results.
2022-12-15 20:50:44 +00:00
Andrew Ruthven
a5d19142bb Fix typo 2022-12-15 22:56:47 +13:00
Piotr Filip
f29af80116 delete collection by id 2022-12-13 00:30:27 +00:00
Bill McGonigle
abbb6e5e70 support php_fpm under Apache 2.4 (missing PATH_INFO with Apache handler). 2022-12-13 00:12:44 +00:00
Piotr Filip
35641b099a refactor scripts to allow operation with Content-Security-Policy: script-src 'self' 2022-12-12 21:32:57 +00:00
ruliane
43bda7a5ba Fix error when $icfg is not set. 2022-12-12 21:13:49 +00:00
ruliane
19ec6fd2fb Fix PHP Notice: Undefined variable: body in /usr/share/davical/inc/iSchedule.php on line 435 2022-12-12 20:57:34 +00:00
Andrew Ruthven
042237b05d PHP 8.2 seems to set the timezone to UTC, always set Pacific/Auckland for testcases
Previously the logic only set Pacific/Auckland if the date.timezone setting
on the PHP ini files wasn't set. Let's just always set it if we're processing
the test suite.
2022-12-10 15:37:43 +13:00
Andrew Ruthven
6ad794eae6 freq_name is only used locally
This doesn't need to be an object field.
2022-12-10 14:37:31 +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
46feee1ec7 Stop copying all fields from the Principal object.
PHP 8.2 deprecates dynmically adding properties. See:
  https://php.watch/versions/8.2/dynamic-properties-deprecated

This arbitary copying of all fields tickles these deprecation
warnings, and just below we copy exactly the fields we need.
I reckon this loop is redundant.
2022-12-10 02:46:37 +13:00
Andrew Ruthven
8162b9f850 Ensure that propfind for access is deterministic.
I noticed that the ordering of principals returned wasn't deterministic
for tests. Ensure it is.
2022-12-10 02:04:27 +13:00
Florian Schlichting
88670bfa39 release davical 1.1.11 2022-10-04 14:05:19 +02:00
Florian Schlichting
f44a996432 do not report VTODO in freebusy (fixes: #267)
RFC 4791 clearly states in 7.10:
    Only VEVENT components without a TRANSP property or with the TRANSP
    property set to OPAQUE, and VFREEBUSY components SHOULD be considered
    in generating the free busy time information.

Looking at fa67ef987e, this used to be VFREEBUSY until the refactoring, and
0886-REPORT-freebusy.test still had that.

Apparently we're not (yet) considering VAVAILABILITY (RFC 7953) here.
2022-10-04 08:47:53 +02:00
Andrew Ruthven
6cf8d5f81d Another attempt to make the results deterministic 2022-07-12 14:27:50 +12:00
Andrew Ruthven
26b92a864d Try and be more deterministic. 2022-06-28 23:57:18 +12:00
Andrew Ruthven
d90d85d00e Make GET on a collection deterministic.
Turns out it was returning a sorted list based on a generated uuid, which
could be different in different regression environments. When I was
running tests locally I was always using the same initial.dbdump
file. The tests now pass even with a truely fresh regression DB.
2022-06-28 22:47:31 +12:00
linda.fliss
e8b43e60db fixed debug injection 2022-02-18 15:55:36 +01:00
Andrew Ruthven
0913f8ca69 Fix another PHP 8.1 error 2022-02-18 23:11:50 +13:00
Andrew Ruthven
5f71ccae8b Limit results for get_include_subcollections
Closes #231.
2022-02-18 23:11:50 +13:00
Paul Waite
dd5bd9c282 Provide a facility for setting an override URL which will replace the Change Password UI, and the Forgotten Password UI with a clickable link. 2022-02-12 14:02:54 +00:00
Andrew Ruthven
cf0e2774f6 Fix a second time where the array might be false. 2022-02-13 01:46:44 +13:00
Raivo Hool
f42627c89f Fix iSchedule configuration with PHP 8
Closes #252.
2022-02-13 01:45:25 +13:00