65 Commits

Author SHA1 Message Date
TowyTowy
0e15021c11 Fix: time-range filter on VTODO with DTSTART/DUE and CREATED/COMPLETED
visit_time_ranges() reuses a single "original_duration" variable for two
unrelated purposes: the DTSTART->DUE span and the CREATED->COMPLETED span.
When a VTODO carries all four properties (a completed task, which most
clients write with CREATED and COMPLETED), the second assignment clobbers
the first, and the DTSTART/DUE branch of the rfc4791-9.9 table then
reconstructs DUE as DTSTART + (COMPLETED - CREATED).

The elif chain already implements the RFC table correctly (DTSTART/DUE
take precedence over CREATED/COMPLETED), so the CREATED/COMPLETED value
is never wanted there. Keep it in its own variable.

Effect: such a VTODO is filtered against a bogus interval, both in
calendar-query REPORT and in item.find_time_range() (the enclosing range
cached for the storage prefilter), so completed tasks go missing from -
or wrongly appear in - client results.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-04 20:05:04 +02:00
Peter Bieringer
d6c245f457 event test: add y2040 test 2026-08-02 15:16:22 +02:00
Peter Bieringer
432a599a13 max_vevent_rrule_occurrence: change loglevel, align test ics name 2026-08-02 15:12:48 +02:00
Peter Bieringer
e430e7984c add missing test case 2026-08-02 11:39:02 +02:00
Peter Bieringer
320ad29424 max_vevent_rrule_entries: test cases 2026-08-01 18:56:13 +02:00
TowyTowy
9d46d5b63d Fix: expand REPORT leaves recurrence properties on expanded instances
_strip_single_event() removed the recurrence-defining properties (RRULE,
EXDATE, EXRULE, RDATE) with a single try/except around sequential
delattr() calls. When one of them was absent (e.g. an event with no
EXDATE), the AttributeError aborted the whole block and the following
properties -- notably RDATE -- were left on the expanded
single-occurrence VEVENTs returned by a calendar-data expand REPORT.

Remove each property independently so a missing one no longer prevents
removal of the others. Add a regression test and fixture.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-12 22:30:47 +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
64005c967b fix trailing space bug introduced by Microsoft 2026-06-28 21:19:27 +02:00
Peter Bieringer
3f973a870d add test cases for PERIOD support 2026-06-21 16:31:29 +02:00
Peter Bieringer
d76a443c5d sharing/bday/tests: add missing file 2026-06-11 15:27:57 +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
1ea3933faf sharing/bday/template: test case extension/fixes 2026-05-31 06:00:55 +02:00
Peter Bieringer
c44c414b91 event item with only 1 attendee 2026-04-10 08:33:57 +02:00
Peter Bieringer
7870d6431a hook/email/test: add new test item 2026-04-10 07:52:51 +02:00
Peter Bieringer
f11b4f3c4a sharing/bday: add additional test cases 2026-03-15 18:20:49 +01:00
Georgiy
c4362b6392 Merge branch 'master' of github.com:metallerok/Radicale into recurrence_all_day_comparsion 2026-02-06 19:43:53 +03:00
Georgiy
0493a88190 (#1966) Test for incompatible overridding RECURRENCE-ID dt type 2026-02-05 19:58:32 +03:00
Georgiy
4e88cbbbc2 Merge branch 'master' of github.com:metallerok/Radicale into recurrence_all_day_comparsion 2026-02-04 19:34:52 +03:00
Georgiy
76d798ccd5 (#1979) test for overridden all day rrule event 2026-02-04 19:26:12 +03:00
Peter Bieringer
fa38e25468 add files for testcase 2026-01-22 21:36:07 +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
c1f39d24f7 add new test ics 2025-12-11 23:14:08 +01:00
Peter Bieringer
5b2cb5c0bf add new test cases for broken items 2025-12-01 18:52:20 +01:00
Peter Bieringer
d1679a53b1 new test items 2025-09-24 21:17:13 +02:00
Peter Bieringer
2a808fd373 test items having tzinfo only on dtstart or dtend set for whatever reason 2025-08-22 07:50:47 +02:00
Georgiy
7cd918d036 (#1812) Fixed an issue where non-recurring events were not included in
the response when requesting an expand report
2025-07-21 20:58:58 +03:00
David Greaves
83a7853405 add test_report_with_max_occur and fix vevent count issue found
Signed-off-by: David Greaves <david@dgreaves.com>
2025-07-08 16:09:28 +01:00
David Greaves
3f4f405554 Test for anti-DoS for expand
The only response from the server is a 400

Signed-off-by: David Greaves <david@dgreaves.com>
2025-07-08 15:24:28 +01:00
David Greaves
01bcc7d009 add test for specific ics and query in issue#1812
Signed-off-by: David Greaves <david@dgreaves.com>
2025-07-06 15:16:31 +01:00
Peter Bieringer
63ea229865 add items for valarm test cases 2025-05-16 06:33:22 +02:00
Peter Bieringer
804170a4d5 fix-issue-1635: extend changelog 2024-12-05 07:54:03 +01:00
Pieter Hijma
cfc1e94ad8 Expand taking timezone into account 2024-11-08 15:59:34 +01:00
Pieter Hijma
2d5dc5186b Expand overridden recurring events 2024-11-07 21:01:11 +01:00
Pieter Hijma
ae274911d5 Fix timezone in test file 2024-11-07 15:36:16 +01:00
Ray
29b7cd8d54 Fix for free-busy fbtype statuses 2024-08-14 05:43:53 -06:00
Georgiy
acf65e9d6a (#1485) Fix processing all day expanded events 2024-05-29 16:33:54 +03:00
Georgiy
513415d201 start creating test for rrule expand property, fix expand processing 2024-04-01 19:27:59 +03:00
Tobias Brox
7d4a0fe70e Test code for category search issue (ref https://github.com/Kozea/Radicale/issues/1280 and https://github.com/Kozea/Radicale/issues/1125) 2023-03-05 17:19:08 +01:00
Unrud
ed8a2284a4 Test calendar with case-sensitive-UIDs 2022-03-30 22:27:05 +02:00
Unrud
75df1093be Workaround for broken contact PHOTO from InfCloud
See issue #1205
2022-01-15 23:44:00 +01:00
Unrud
a20791e0c3 Convert EXDATE and RDATE to same type as DTSTART
Fixes #1146
Closes #1199
2021-12-20 00:55:39 +01:00
Unrud
ca27156605 More tests
for PROPPATCH, PROPFIND, MKCALENDAR and MKCOL
2020-09-26 22:08:22 +02:00
Unrud
e0247f8f92 Cosmetics 2020-05-24 13:41:08 +02:00
Unrud
5a433f5476 Test internal server 2018-09-04 03:33:45 +02:00
Unrud
c7e65fbb7f require UIDs in CalDAV/CardDAV / check for duplicated UIDs / try to use UIDs as filenames 2018-08-16 07:59:57 +02:00
Unrud
a6b1219ba5 Fix UID for journal3.ics test data 2018-08-14 20:08:42 +02:00
Unrud
18e4677cb7 Add test for mixed local DATE-TIME with time zone and UTC (Test #765) 2018-04-27 18:37:22 +02:00
Unrud
233a54f73b Add test for VTODO with RRULE (Test #764) 2018-04-27 18:37:22 +02:00
Unrud
70e7363be6 Test timezone with minutes and seconds 2018-04-21 10:44:59 +02:00