Commit Graph

4612 Commits

Author SHA1 Message Date
Peter Bieringer
c1f3217c01 Release 3.7.8 2026-08-06 08:01:32 +02:00
Peter Bieringer
542467bdcc Merge pull request #2193 from TowyTowy/fix/vtodo-time-range-completed-clobbers-due
Fix: time-range filter on VTODO with DTSTART/DUE and CREATED/COMPLETED
2026-08-04 22:26:29 +03:00
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
3ad8ae1d39 Merge pull request #2190 from pbiering/issue-2188
max options extension
2026-08-03 08:23:18 +03:00
Peter Bieringer
b9b80a8e88 max_vevent_rrule_occurrence: cosmetics 2026-08-02 21:01:11 +02:00
Peter Bieringer
94c77e48d3 fix MONTHLY interval 2026-08-02 18:45:11 +02:00
Peter Bieringer
751189d708 max_vevent_rrule_occurrence: TZ fix of RRULE/UNTIL 2026-08-02 16:43:30 +02:00
Peter Bieringer
75a5d9f10e max_vevent_rrule_occurrence: exclude 50/5000y tests from 32-bit platform for now 2026-08-02 16:29:05 +02:00
Peter Bieringer
e225704174 max_vevent_rrule_occurrence: add additional test cases 2026-08-02 16:22:08 +02:00
Peter Bieringer
490fbbf69d max_vevent_rrule_occurrence: improve pre-check 2026-08-02 16:03:25 +02:00
Peter Bieringer
7cbf418d34 fix test case item name 2026-08-02 16:03:06 +02:00
Peter Bieringer
c0b163f778 align destination event names 2026-08-02 15:26:18 +02:00
Peter Bieringer
1b05af4233 test_add_event_y2040 2026-08-02 15:16:46 +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
202c9396ce log cosmetics 2026-08-02 11:35:45 +02:00
Peter Bieringer
4187811bc2 max_vevent_rrule_occurrence: improve logging, catch FREQ+UNTIL 2026-08-02 10:58:58 +02:00
Peter Bieringer
953aebc85f max_vevent_rrule_occurrence: rename option 2026-08-02 10:58:13 +02:00
Peter Bieringer
fc1e53cb47 update doc 2026-08-01 21:28:04 +02:00
Peter Bieringer
67dbf8b3c6 max_expand_occurrence: additional test cases 2026-08-01 18:56:37 +02:00
Peter Bieringer
320ad29424 max_vevent_rrule_entries: test cases 2026-08-01 18:56:13 +02:00
Peter Bieringer
bcb5061416 add support for max_vevent_rrule_entries 2026-08-01 18:55:29 +02:00
Peter Bieringer
b044addc53 Add: [system] max_vevent_rrule_entries option to catch DoS by problematic RRULE early enough 2026-08-01 18:54:31 +02:00
Peter Bieringer
4a4e571cce Add: [report] max_expand_occurrence option to separate from max_freebusy_occurrence 2026-08-01 18:52:08 +02:00
Peter Bieringer
e9453c59cf Merge pull request #2189 from pbiering/issue-2187
Sharing-by-map: add support for collection requests missing a trailing /
2026-08-01 10:44:32 +03:00
Peter Bieringer
6cdf0e75b4 sharing/map: collection missing trailing / - changelog 2026-08-01 08:48:55 +02:00
Peter Bieringer
4952d2c3d9 sharing/map: add test cases for collections without trailing / 2026-08-01 08:47:01 +02:00
Peter Bieringer
9f2d193fa5 sharing/map: catch collection path with missing trailing / 2026-08-01 08:46:05 +02:00
Peter Bieringer
c65b8fee09 sharing: extend comments 2026-08-01 08:45:38 +02:00
Peter Bieringer
43eea27b7e Development 3.7.8.dev 2026-07-19 17:18:33 +02:00
Peter Bieringer
bd7405a033 sharing/proppatch: add forgotten honor of 'p' in case of write access 2026-07-19 17:17:54 +02:00
Peter Bieringer
49a4bffa85 Release 3.7.7 2026-07-19 16:31:27 +02:00
Peter Bieringer
5fdc809d63 sharing: bday conversion: test delete as user 2026-07-19 15:56:52 +02:00
Peter Bieringer
eb00d8c796 changelog for 802fd4b2cf 2026-07-19 11:07:36 +02:00
Peter Bieringer
7d690b3325 sharing/delete: fix 2026-07-19 10:58:43 +02:00
Peter Bieringer
a7867fe37e make isort happy 2026-07-19 10:35:13 +02:00
Peter Bieringer
802fd4b2cf changelog for 924abaa46cc367e434bc496f847551b916b7f6ef 2026-07-19 10:24:59 +02:00
Peter Bieringer
fe5fd55723 sharing: add forgotten backmap for delete 2026-07-19 10:24:23 +02:00
Peter Bieringer
6468f9d6f8 Merge pull request #2184 from TowyTowy/fix/serve-resource-mimetypes
Fix: serve_resource/serve_folder ignore their mimetypes and fallback_mimetype parameters
2026-07-18 14:37:13 +03:00
TowyTowy
651e30211c Fix: serve_resource/serve_folder ignore mimetypes and fallback_mimetype parameters
httputils._serve_traversable looked up the Content-Type in the
module-level MIMETYPES/FALLBACK_MIMETYPE constants instead of the
mimetypes/fallback_mimetype parameters that serve_resource() and
serve_folder() accept and pass through. The parameters exist since the
helper was extracted for use by web plugins (33fcda7c, "Extract
httputils.serve_folder"), and the sibling parameters path_prefix and
index_file are honored, but a custom web plugin passing its own
mimetype mapping (e.g. to serve .json, .ico or .mjs files with a
correct Content-Type) silently got the built-in mapping and
application/octet-stream fallback instead.

Use the parameters for the lookup. No behavior change for the built-in
web module, which relies on the defaults.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 12:10:37 +02:00
Peter Bieringer
99f1862c82 Merge pull request #2183 from TowyTowy/fix/freebusy-unlimited-occurrence
Fix: free-busy REPORT always fails with HTTP 400 when max_freebusy_occurrence is 0
2026-07-17 08:45:29 +03:00
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
Peter Bieringer
8d76bdde43 Merge pull request #2182 from TowyTowy/fix/bday-empty-fn-placeholder
Fix: bday conversion clobbers NICKNAME when FN is empty
2026-07-15 21:37:13 +03:00
TowyTowy
c2a73cdc2d Fix: bday conversion clobbers NICKNAME when FN is empty
The share-by-map BDAY-to-ICS conversion builds a placeholder mapping for
the SUMMARY/DESCRIPTION/alarm templates. Each block sets the fallback
marker for its own placeholder (e.g. {nickname} -> '!nickname!', {n:f} ->
'!n:f!'), but the {fn} block wrote the empty-FN fallback to {nickname}
instead of {fn}.

As a result, for a VCARD whose FN is present but empty, a genuine
NICKNAME was overwritten with '!fn!' in the generated event, and the
{fn} placeholder never received its '!fn!' marker, so a '[{fn}|...]'
fallback in a template failed to resolve.

Assign the fallback to {fn}, matching the surrounding blocks.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-15 20:28:25 +02:00
Peter Bieringer
0d1c802973 Merge pull request #2181 from TowyTowy/fix/text-match-structured-property
Fix: text-match filter crashes on structured property (vCard N/ADR)
2026-07-15 20:25:36 +03: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
Peter Bieringer
35567e53ba Merge pull request #2180 from TowyTowy/fix/expand-strip-recurrence-props
Fix: expand REPORT leaves recurrence properties (RDATE) on expanded instances
2026-07-13 21:51:13 +03:00
TowyTowy
a7da8ddd4b tests: guard REPORT response type to satisfy mypy
Assert the response is a dict before indexing, matching the existing
pattern used elsewhere in test_expand.py, so the Lint (mypy) job passes.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-13 13:00:41 +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