3541 Commits

Author SHA1 Message Date
Florian Schlichting
3ba605288f release 1.1.6 r1.1.6 2017-10-25 11:48:43 +02:00
Florian Schlichting
7674fe9831 'perl update-davical-database' did not find the intended config file / patchdir
people may use that invocation in addition to calling
/usr/share/davical/dba/update-debian-database, and happen upon a
cryptic error when YAML tries to parse dba/update-davical-database
instead of config/administration.yml
2017-10-09 10:17:03 +02:00
Florian Schlichting
5dc4aed87c testsuite: support /principals/users/ and similar special URLs 2017-10-04 23:28:03 +02:00
Florian Schlichting
8d1a4dba0f testsuite: update for calendar-user-type support 2017-10-04 23:28:03 +02:00
Florian Schlichting
2ed5edaf5a Update scheduling test-suite: consistent linebreaks, unnecessary quoting, etags 2017-10-04 23:28:03 +02:00
Florian Schlichting
50dd8a8d73 fix confusing comments 2017-10-04 23:28:03 +02:00
Florian Schlichting
8f16da75eb fix "PHP Warning: preg_match(): No ending delimiter '.' found"
the second argument of param_to_global, if set, becomes the first
argument of a call to preg_match(). Unless it's the special value 'int',
it needs to have regex delimiters around it, like '/.*/'

In this case, we're not interested in the value of the add-member
parameter, we only want to check for its existence, so skip validation.
2017-10-04 23:02:12 +02:00
Florian Schlichting
528f4dd62d add a log entry for login failures (fix #105) 2017-10-04 22:36:33 +02:00
Florian Schlichting
88bf8fa704 PUT: actually propagate database error to client (fix: #127) 2017-10-04 22:36:33 +02:00
Florian Schlichting
39001794a3 Update caldav_functions.sql for Postgresql 10
From version 10, Postgresql does not allow set-returning functions in
CASE statements. As we're using the functions recursively, we cannot
use LATERAL as suggested in the error message, but we can switch the
condition inside-out with only a limited amount of repetition.
2017-10-04 22:36:29 +02:00
Florian Schlichting
6ad5511c1e fix "PHP Notice: Undefined property" warnings 2017-10-04 22:36:07 +02:00
Florian Schlichting
b9ea83379c Merge branch 'calendar_user_type' into 'master'
Add support for calendar-user-type

See merge request davical-project/davical!39
2017-10-04 20:29:01 +00:00
Pierre GIRAUD
8e04eb27ae
Add support for calendar-user-type 2017-10-03 11:44:19 +02:00
Frank Steinberg
3bb6cd4479 Resolve attendee group names to lists of individual users. Configurable by $c->enable_attendee_group_resolution (from !21) 2017-09-21 23:27:51 +02:00
Florian Schlichting
44ff0b3286 update tests for changed etags, unstable REV/UID or sort order, improved property parsing
Changed line wrapping in awl is one major reason for etag changes.

With this commit, all tests in regression-suite, binding and carddav
pass for me, using the configuration outlined in README.regression_tests
2017-09-21 00:39:30 +02:00
Florian Schlichting
0cab01f390 dav_test: all files and I/O are UTF-8 2017-09-21 00:39:24 +02:00
Florian Schlichting
69ef196730 create-database.sh: call update-davical-database with --dbuser instead of just --owner (see #124) 2017-09-20 17:02:57 +02:00
Florian Schlichting
10bb69d0a0 Card search invalid when negate-condition="no" (fixes #126)
Thanks Bart Vullings for reporting the bug and providing a fix!
2017-09-20 16:15:58 +02:00
Florian Schlichting
b550352aa5 POST: Fix namespace for caldav scheduling privileges
we use CALDAV:schedule-foo-bar in AllowedTo, but here it causes
XMLDocument to throw a DAViCal Fatal Error: [0] Dodgy looking namespace
from 'CALDAV:schedule-send-invite'!
2017-09-19 21:23:06 +02:00
Florian Schlichting
4410d7e94a dont put caldav.php in special URLs 2017-09-19 21:23:06 +02:00
Florian Schlichting
7f59b828d5 log failed attempts to set_dav_property
the path is not a known regular principal, collection, binding or resource
2017-09-19 21:23:06 +02:00
Florian Schlichting
7e3a9a476f group memberships for the calendar-proxy-{read,write} pseudo-principal are always empty
Only regular principals can be members in any groups, for
pseudo-principals group membership doesn't make sense. In case somebody
asks, do not return the group memberships of the parent principal but
rather provide an empty answer.
2017-09-19 21:22:58 +02:00
Florian Schlichting
8c5101c185 PROPPATCH: reject protected properties group-membership, calendar-proxy-{read,write}-for 2017-09-19 21:19:15 +02:00
Florian Schlichting
a6b286ab98 caldav-proxy 5.2: calendar-proxy-read/write are themselves principal resources
Fixes the CalDAV/calendaruserproxy.xml test.
2017-09-19 21:19:02 +02: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
5f3aecfda4 Revert "Support http://.../freebusy.php?foo@example.com"
This reverts commit 38788acc5cbec147d6a46a6254ef8eec0a270c71, which
causes the following tests to fail (not return any FREEBUSY):

    tests/regression-suite/0832-freebusy.test
    tests/regression-suite/0836-freebusy.test
    tests/regression-suite/0837-freebusy.test
    tests/regression-suite/0888-GET-freebusy.test
2017-09-19 20:01:00 +02:00
Florian Schlichting
40e2714adf use new AWL class constructor (fixes: #119) 2017-05-29 23:04:30 +02:00
Florian Schlichting
b4a1e39d6d CalDAVRequest: make content-type match non-greedy
this fixes a warning when the client doesn't include a space between
content-type and charset:

LOG: WARNING:Application sent content-type of "text/vcard;charset=utf-8" instead of "text/vcard"
2017-05-17 11:20:21 +02:00
Andrew Ruthven
22e0e4aa38 Improve parsing of RFC5545 durations
The previous regex failed to parse PT15M which is a valid duration.

This version more correctly implements:
  https://tools.ietf.org/html/rfc5545#section-3.3.6

It isn't totally correct as it incorrectly allows:

  PT10H20S

Which is invalid due to no minutes being present. Oh well.
2017-05-17 11:06:29 +12:00
Andrew Ruthven
38788acc5c Support http://.../freebusy.php?foo@example.com
Sometimes users set the Free/Busy URL to have a ?, not a /. Let's
support that.
2017-05-16 13:33:19 +12:00
Florian Schlichting
b1191bd83c caldav: leave some info about the exception we are catching 2017-04-28 17:43:13 +02:00
Florian Schlichting
ebdd6b1674 fix config example as well 2017-04-25 00:10:22 +02:00
Florian Schlichting
bbea62d288 Merge branch 'server-array-upper' into 'master'
Convert array keys for $_SERVER to uppercase

See merge request !38
2017-04-24 21:59:08 +00:00
Florian Schlichting
513e58fa41 Merge branch 'external-ua' into 'master'
Set the user agent string for external calendars

Closes #115

See merge request !37
2017-04-24 21:20:34 +00:00
Jan Losinski
b5072dd154 Set the user agent string for external calendars 2017-04-24 21:20:34 +00:00
Florian Schlichting
a16dfc7c41 cardquery: query limit can be used independently of any query filter 2017-04-24 22:31:32 +02:00
Florian Schlichting
76e540fb0a cardquery: typo, ends-with has wildcard in front 2017-04-24 22:30:53 +02:00
Florian Schlichting
29e2dbfe92 cardquery: a prop-filter without an actual filter rule means we simply need to ensure the property exists
This guards against a crash when calling ->GetNSTag() on a non-object.

This may need to be refined in case we could be dealing with something
that's not a prop-filter.
2017-04-24 22:25:18 +02:00
Jan Losinski
e97c9674e9 Convert array keys for $_SERVER to uppercase
It seems to be the case, that array indicies in $_SERVER are always
uppercase. Sadly I could not find any documentation of this but at
least with mod_php it is the case. Also a extensive search on github
projects seems to support this thesis.

On my installation the 'X-FORWARDED-PROTO' is even then uppercase when
its mixed case in the Header provided by the reverse proxy.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2017-04-13 03:00:36 +02:00
Florian Schlichting
06e20e5508 dont send early exceptions to the client only, leave a trace in the error log too 2017-04-08 16:43:21 +02:00
Florian Schlichting
323292eb8c log an error instead of crashing on principal-property-search REPORT without a proper match clause (fix #114) 2017-04-08 14:41:50 +02:00
Florian Schlichting
e94d69d3f7 do not output unescaped XML special characters in if-match error message (fixes: #113) 2017-04-08 13:54:49 +02:00
Rik Theys
e0b8ecada5 Fix modified mapping (fix #108)
The checks to test if a "modified" attribute was found in the
$valid array used in_array, which fails.

Replace this with array_key_exists calls.

This fixes https://gitlab.com/davical-project/davical/issues/108

[ $mapping['modified'] is a key in $valid, not a value. This is a
regression introduced in 970b61ac, for 1.1.5 ]
2017-04-08 00:09:50 +02:00
Florian Schlichting
d205521bd4 drivers_ldap says "updated" has been replaced with "modified", so update example config accordingly 2017-04-07 23:58:33 +02:00
Scott Balneaves
8313f765ce Only list active principals in grant selection
modified as per Andrew McMillan's suggestion
2017-04-07 15:09:53 +02:00
Scott Balneaves
8052111635 modify hide_older_than logic to allow through recurring events (fixes #103, !36) 2017-04-07 15:08:10 +02:00
Florian Schlichting
1c174f4b78 fix sync of deleted events when hide_todo is set (fixes #100)
thanks Jerome Borsboom @hinotori
2017-04-07 14:29:42 +02:00
Florian Schlichting
74828c8c60 Update testsuite for changes related to #112 (4cf6628) 2017-04-07 14:17:00 +02:00
Florian Schlichting
4cf6628ea5 cannot-modify-protected-property should be used with 403 Forbidden, not 409 Conflict
see the end of https://tools.ietf.org/html/rfc4918#section-16 (WebDAV,
Precondition/Postcondition XML Elements)
2017-03-29 11:22:44 +02:00
Florian Schlichting
fb4f80d4c1 do not put two sets of angle brackets around cannot-modify-protected-property error tag (fixes #112) 2017-03-29 11:20:35 +02:00