• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

collective / icalendar / 26219394471
98%

Build:
DEFAULT BRANCH: main
Ran 21 May 2026 10:06AM UTC
Jobs 7
Files 229
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 May 2026 10:05AM UTC coverage: 97.777% (+0.002%) from 97.775%
26219394471

push

github

web-flow
Fix RecursionError in Component.__repr__ on deeply nested calendars (Closes #1370) (#1371)

* Fix RecursionError in Component.__repr__ on deeply nested calendars

Component.__repr__ recursively calls str() on every subcomponent.
Parsing accepts BEGIN/END nesting of arbitrary depth (the parser
itself is iterative), so a ~13 KB .ics with ~500 nested VEVENTs
caused any caller doing repr(cal) / str(cal) / f"{cal}" to raise
an uncaught RecursionError at the default recursion limit.

This affects logging, error reporting, and debug-page rendering of
attacker-controlled calendars (e.g. CalDAV, .ics import endpoints,
calendar invitation processing).

Replaced the recursive implementation with an iterative stack-based
walk. Output format is unchanged for normally-shaped calendars.
Added regression tests covering depths up to 1000 and the unchanged
shallow-calendar format.

Existing OSS-Fuzz harness in src/icalendar/fuzzing/ical_fuzzer.py
exercises from_ical() / walk() / to_ical() but not __repr__, which
is why this code path slipped through fuzzing.

* Address review feedback: parametrize str test, add exact-equality tests

Per @angatha review on PR #1371:

- Parametrize ``test_str_does_not_raise_recursion_error`` with the same
  depths as the ``repr()`` test ([10, 100, 500, 1000]) and combine the
  two into a single test whose only varying axis (besides depth) is the
  string-conversion function.

- Add exact-equality tests for ``repr()`` output:

  * ``test_repr_exact_output_for_nested_components`` builds nested empty
    ``Event``s under a ``Calendar`` and asserts the entire ``repr()``
    string equals the format produced by the previous recursive
    implementation: ``VCALENDAR({}, VEVENT({}, ...))``.

  * ``test_repr_exact_output_for_sibling_components`` does the same for
    two sibling VEVENTs: ``VCALENDAR({}, VEVENT({}), VEVENT({}))``.

  Using empty constructed components keeps the expected string
  independent of the ``repr`` of any parsed property value.

755 of 777 branches covered (97.17%)

Branch coverage included in aggregate %.

53 of 54 new or added lines in 2 files covered. (98.15%)

12399 of 12676 relevant lines covered (97.81%)

6.84 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
97.82
-0.1% src/icalendar/cal/component.py
Jobs
ID Job ID Ran Files Coverage
1 run-3.14 - 26219394471.1 21 May 2026 10:06AM UTC 229
97.72
GitHub Action Run
2 run-pypy3 - 26219394471.2 21 May 2026 10:16AM UTC 229
97.73
GitHub Action Run
3 run-3.11 - 26219394471.3 21 May 2026 10:08AM UTC 229
97.73
GitHub Action Run
4 run-3.12 - 26219394471.4 21 May 2026 10:07AM UTC 229
97.73
GitHub Action Run
5 run-3.13 - 26219394471.5 21 May 2026 10:07AM UTC 229
97.73
GitHub Action Run
6 run-3.10 - 26219394471.6 21 May 2026 10:08AM UTC 229
97.78
GitHub Action Run
7 run-3.10 (nopytz) - 26219394471.7 21 May 2026 10:08AM UTC 229
97.78
GitHub Action Run
Source Files on build 26219394471
  • Tree
  • List 229
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #26219394471
  • 67d6ab97 on github
  • Prev Build on main (#26029940281)
  • Next Build on main (#26246962515)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc