Parse server iCalendar through vcal.parse_ical() consistently
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start by reading the existing vcal.parse_ical() implementation and its four current call sites, then inspect the server-fed parsing paths named in caldav/jmap/objects/calendar_object.py, caldav/datastate.py and caldav/calendarobjectresource.py. Clarify whether the scope includes vobject parsing, caller-supplied calendars, and a tree-wide enforcement test; done means the agreed server-fed paths use consistent errors without changing the stated malformed-calendar boundary.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Issue below was AI-generated, the introduction has been hand-edited
vcal.parse_ical() was added to handle CalDAV-noise before it would
cause a ValueError exception coming from the icalendar library.
The "CalDAV-noise" can be a body with no iCalendar in it - an empty
scheduling-inbox object, an HTML error page delivered with a 200, a
notification carrying only headers, etc. parse_ical() raises
error.ResponseError instead, quoting what arrived and the URL where
one is known.
It is currently used at four of the parse sites, and there are others that still
hand data to the parser directly. Anything that can be fed by a server should go
through the guard, so the error is the same everywhere.
Sites still parsing directly
caldav/jmap/objects/calendar_object.py:64-
icalendar.Calendar.from_ical(jscal_to_ical(self.data)). Server-fed:self.data
is JSCalendar from a JMAP response, so a server that returns something
unconvertible lands here. This is the one that matters.caldav/datastate.py:140,:192,:228and
caldav/calendarobjectresource.py:1612-vobject.readOne(...). Same data,
different parser, same problem: an empty body gives a vobject error that says
nothing about where it came from. Aparse_vobject()counterpart, or one guard
the two share, would cover it.caldav/lib/vcal.py:243(insidecreate_ical()) and
caldav/jmap/convert/ical_to_jscal.py:306- both parse iCalendar the caller
supplied, not a server response. Arguably these should keep raising whatever
icalendar raises, since a broken fragment there is a client-side bug, not a
server one. Worth deciding explicitly rather than by omission.
Points worth deciding
- Should the guard fire on the JSCalendar side too - a JMAP response that
converts to no components at all - or only once it has become iCalendar? parse_ical()is deliberately narrow: it fires only when the body holds no
BEGIN:line, and hands anything containing a component to icalendar unchanged.
That boundary should stay wherever it is applied, so that a genuinely malformed
calendar is not reclassified as a server error.- A test that walks the module tree and fails on a bare
icalendar.Calendar.from_ical(/vobject.readOne(outside the guard would keep
this from drifting back. Cheap, and the kind of rule that only holds if it is
enforced.
- Ngôn ngữ chính
- Python
- Star
- 412
- Fork
- 113
- Merge trung bình
- 22 giờ 43 phút
- Pull request đã merge (30 ngày)
- 43
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python-caldav/caldav
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
python-caldav/caldav#687 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
python-caldav/caldav#782 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
python-caldav/caldav#780 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
compatibility refactoring
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
python-caldav/caldav#778 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support for ical objectsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
python-caldav/caldav#777 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của python-caldav/caldav
Issue tương tự
-
docs: the dev-setup table and AGENTS.md name the reviewed_by guard that CI's Changelog job runsĐang mởarea: tools documentation good first issue ready for a contributor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
eyalgolan/statecraft-israel#873 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add cover art to song rowsĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 5 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày