Commit Graph

204 Commits

Author SHA1 Message Date
TowyTowy
f38688456d Fix: free-busy REPORT always fails when max_freebusy_occurrence is 0
free_busy_report() explicitly handles [reporting] max_freebusy_occurrence = 0
as "limit disabled" when fetching occurrences (n=0 lets time_range_fill
return all occurrences), but the subsequent limit check
'len(occurrences) >= max_occurrence' is trivially true for
max_occurrence == 0, so every free-busy query on a non-empty calendar
raised ValueError ("FREEBUSY occurrences limit of 0 hit") and was
answered with HTTP 400.

Skip the limit check when the limit is disabled, consistent with how
xml_report() treats the same setting ('if max_occurrence and ...').
Behavior for positive limits is unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-17 01:06:51 +02:00
TowyTowy
f48dc47177 Fix: text-match filter crashes on structured property (vCard N/ADR)
A CardDAV addressbook-query REPORT with a text-match prop-filter on a
structured property (e.g. N or ADR) returned HTTP 500. vobject parses
these into Name/Address objects rather than plain strings, so text_match
called .lower() on a non-string and raised AttributeError. Coerce
non-string values to their text representation before matching.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-15 11:26:45 +02:00
TowyTowy
e557c0cd5e Fix: time-range filter matches VEVENT with whole-day DURATION
A calendar-query REPORT with a time-range filter failed to return a
VEVENT that has a whole-day DURATION (e.g. DURATION:P1D or P2D) whenever
the queried range fell inside the event but after DTSTART.

The VEVENT time-range logic in radicale/item/filter.py gated the
"non-zero duration" branch (rfc4791-9.9 line 2) on timedelta.seconds
instead of timedelta.total_seconds(). For a duration that is an exact
multiple of 24h, timedelta.seconds is 0 (the days component holds the
value), so the event was treated as zero-length (line 3) and only
matched a one-second window at its start. An identical event expressed
with DTEND matched correctly, confirming the defect is isolated to the
DURATION path.

Use total_seconds() so multi-day durations are handled correctly. Adds a
regression test (event11, DURATION:P2D) covering both an inside-range
match and an outside-range non-match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 15:58:39 +02:00
Peter Bieringer
69b265b539 mark also windows for non-reliable sleep times 2026-06-28 22:15:44 +02:00
Peter Bieringer
ed6095620e add test case 2026-06-28 21:19:47 +02:00
Peter Bieringer
3f973a870d add test cases for PERIOD support 2026-06-21 16:31:29 +02:00
Peter Bieringer
5914deff28 add 2nd testcase 2026-06-07 08:24:27 +02:00
Peter Bieringer
22ea4fe302 testcase for issue-2151 2026-06-06 23:18:47 +02:00
Peter Bieringer
8eb681931a validation: extend test cases for unicode-letter 2026-05-12 12:29:26 +02:00
Peter Bieringer
da668035ba log on_notice_condition: test cases 2026-05-12 08:35:28 +02:00
Peter Bieringer
e5add4c3b9 propfind/test: extend allprop test cases 2026-05-04 21:40:21 +02:00
Max Berger
cdf9e62e0b expose server version via PROPFIND on root collection and display in the UI for authenticated users 2026-04-29 23:13:36 +02:00
Peter Bieringer
351ad693d2 user/path value check: adjust test cases 2026-04-23 06:13:32 +02:00
Peter Bieringer
9137f5bca4 test: add cases for user/path value check 2026-04-23 06:13:31 +02:00
Peter Bieringer
ad43feacb8 delay_on_error: remove trigger flag from environment 2026-04-03 07:28:29 +02:00
Peter Bieringer
d50479cefb server_delay_on_error: add test 2026-04-03 07:18:09 +02:00
Peter Bieringer
49db75dae8 delay and sharing/token: align+fix 2026-04-02 13:11:24 +02:00
Peter Bieringer
46c84d44b4 storage/get+discover: test for only add items not exceeding max-resource-size 2026-03-26 07:57:13 +01:00
Peter Bieringer
7fd6cde1fe disable delay for some tests 2026-03-07 16:22:29 +01:00
Peter Bieringer
ffc5184b11 sharing: add support for clearing properties, doc update, fixes 2026-03-07 07:54:37 +01:00
Peter Bieringer
2351f49ae4 add testcases 2026-01-22 21:36:07 +01:00
Peter Bieringer
02a6cd55e3 fix for lint 2026-01-22 06:35:12 +01:00
Peter Bieringer
a75e3ebdec Testcase for PR#1968 (MOVE with URL-encoded Destination header) 2026-01-22 06:30:38 +01:00
John Wiegley
1f76b08831 Add CardDAV supported-address-data, update vCards to 4.0 (#1948)
* Add CardDAV supported-address-data, update vCards to 4.0

- radicale/app/propfind.py: Add CS:getctag and CR:supported-address-data
  properties to VADDRESSBOOK collections in allprop responses; implement
  CR:supported-address-data handler that advertises vCard 4.0 as preferred
  format with 3.0 fallback per RFC 6352 section 6.2.2

- radicale/tests/static/contact1.vcf: Update from vCard 3.0 to 4.0 format

- radicale/tests/static/contact_multiple.vcf: Update both contact entries
  from vCard 3.0 to 4.0 format

- radicale/tests/static/contact_photo_with_data_uri.vcf: Update from vCard
  3.0 to 4.0 format; change PHOTO property from 3.0 syntax with ENCODING=b
  and TYPE parameters to 4.0 data URI syntax

* Conditionally offer vCard 4.0 based on vobject version

- Add vobject_supports_vcard4() helper function in utils.py
- Modify propfind.py to only advertise vCard 4.0 if vobject >= 1.0.0
- Add vCard 3.0 static test files for fallback testing
- Add tests for both vCard 3.0 and 4.0 contacts (v4 tests skipped if
  vobject < 1.0.0)
- Add propfind tests for CR:supported-address-data property

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Default vCard fixtures to v3.0, add explicit v4 files

- contact1.vcf: Change VERSION from 4.0 to 3.0 to make vCard 3.0 the default
  test fixture format, since vCard 3.0 is more widely supported

- contact1_v3.vcf: Delete file as contact1.vcf now serves as the v3.0 fixture

- contact1_v4.vcf: Add new file with VERSION 4.0 for explicit vCard 4.0
  testing with vobject >= 1.0.0

- contact_multiple.vcf: Change VERSION from 4.0 to 3.0 for both contacts to
  align with new default

- contact_multiple_v3.vcf: Delete file as contact_multiple.vcf now serves as
  the v3.0 fixture

- contact_multiple_v4.vcf: Add new file with VERSION 4.0 for both contacts

- contact_photo_with_data_uri.vcf: Change VERSION from 4.0 to 3.0 and update
  PHOTO property to use v3.0 format with ENCODING=b;TYPE=png parameters

- contact_photo_with_data_uri_v3.vcf: Delete file as
  contact_photo_with_data_uri.vcf now serves as the v3.0 fixture

- contact_photo_with_data_uri_v4.vcf: Add new file with VERSION 4.0 and v4.0
  PHOTO data URI format

- test_base.py: Update test methods to use renamed fixture files, with v3.0
  tests using default fixtures and v4.0 tests using explicit _v4.vcf files

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 16:28:10 +01:00
Peter Bieringer
81b3c28737 test RFC4791#5.2.5: SHOULD NOT be returned by a PROPFIND DAV:allprop request 2025-12-12 08:49:23 +01:00
Peter Bieringer
9a31087dfa add testcases for max-resource-size 2025-12-11 23:08:21 +01:00
Peter Bieringer
c3dfd5584d add test case for max-resource-size and getctag 2025-12-11 08:54:42 +01:00
Peter Bieringer
5b2cb5c0bf add new test cases for broken items 2025-12-01 18:52:20 +01:00
Peter Bieringer
85f1850b19 make flake8 happy 2025-11-16 17:03:59 +01:00
Peter Bieringer
91cee5e514 extend test with remote host+useragent 2025-11-16 17:02:31 +01:00
Peter Bieringer
3fecba62e7 fix comment 2025-11-16 16:22:20 +01:00
Peter Bieringer
b2320c607d test case for invalid-sync token with user 2025-11-16 16:07:13 +01:00
Peter Bieringer
ed849a7271 add support for optional arguments 2025-11-16 16:06:26 +01:00
Peter Bieringer
54bd8023b3 add additional etag related tests 2025-10-20 07:41:27 +02:00
Peter Bieringer
bd0d5038b3 cosmetics 2025-10-20 07:41:12 +02:00
Peter Bieringer
8ef8b767f3 strict_preconditions: new config option / test cases 2025-10-19 18:56:23 +02:00
Peter Bieringer
7f28f69452 extend test for items having tzinfo only on dtstart or dtend set for whatever reason, overtake tzinfo from the other one 2025-08-22 07:51:15 +02:00
Peter Bieringer
c8e42c7edc add test cases for filter without comp-filter 2025-07-20 17:50:07 +02:00
Peter Bieringer
d1098c3e22 flake8 regression E261 2025-05-16 07:28:50 +02:00
Peter Bieringer
198131bb9a add test cases for valarm 2025-05-16 06:33:02 +02:00
Peter Bieringer
9e1cac98dc make isort happy 2025-05-16 06:31:39 +02:00
Peter Bieringer
ec391e19b6 add logging around upload 2025-05-16 06:30:27 +02:00
Peter Bieringer
e144ecf06b fix testcases related to https://github.com/Kozea/Radicale/issues/1765 2025-04-22 21:32:13 +02:00
Peter Bieringer
0ef93a9c8a update copyright 2025-04-22 21:31:25 +02:00
Peter Bieringer
8382ee1223 add test case for https://github.com/Kozea/Radicale/issues/1760 2025-04-21 22:19:25 +02:00
Peter Bieringer
be43ce5161 change default of authentication type to "denyall" for secure-by-default 2025-03-15 14:34:51 +01:00
Peter Bieringer
b85c0758d8 extend copyright 2024-12-05 08:14:21 +01:00
Peter Bieringer
3232b34392 fix-issue-1635: add test case 2024-12-05 08:14:06 +01:00
Pieter Hijma
b0d1ccc0f6 Factor expand tests out of base 2024-11-07 21:01:56 +01:00
Pieter Hijma
2d5dc5186b Expand overridden recurring events 2024-11-07 21:01:11 +01:00