An href with `%252F` (a UID holding `/`) comes back under the wrong URL
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #836 của @seriouslysean — đã merge
Đá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
- 20/100
Hướng nghiên cứu
Read _normalize_href, _post_multiget(), normalise_path() and _href_to_url() to trace how listed hrefs are decoded and quoted. Start with the %252F examples in the report and compare search, children, sync and multiget behavior. Done means listed hrefs for UIDs containing / resolve to the same object without losing path components; PR #836 is already open with a fix and tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Setup: iCloud, caldav 3.5.0 and 3.6.0. The events were saved by the iOS Calendar app from invitations (a dental booking site and an Epic MyChart portal).
iCloud names an object whose UID holds a / with the slash as %2F, percent-encoded on top, so the href has %252F (the name _quote_uid() mints too, #143). A GET on the listed href works. Values scrubbed, shapes unchanged:
| UID | href listed |
|---|---|
https://www.example.com/appointments/abc/?token=xyz |
/cal/home/https%3A%252F%252Fwww.example.com%252Fappointments%252Fabc%252F%3Ftoken%3Dxyz.ics |
A7CzVJ5v/[email protected] |
/cal/home/A7CzVJ5v%252FbTJo0Ebqoj2LQ%3D%3D%40mychart.example.org.ics |
_normalize_href decodes the href, and then it gets decoded a second time:
- In the #435 branch: the decoded first href holds a
:, so it's parsed as a URL and its path decoded again.search(),children()and sync return/cal/home/https://www.example.com/appointments/abc/. Any absolute href is decoded twice the same way. - In
_post_multiget(), whosenormalise_path()isquote(unquote(path)):multiget()returns the second object as/cal/home/A7CzVJ5v/bTJo0Ebqoj2LQ%3D%[email protected], which doesn't exist. Withurl.encode-at.identitydeclared,requote_path()does the same in_href_to_url()andchildren().
I'd expect the same for any object saved by this library with a / in its UID, since _quote_uid() mints the same names (not run against the test servers). The ha-test%2Fslash plus%20uid.ics object in #826 looks like the same shape. #783 and #826 are about UID lookups; this is about the hrefs a server lists.
#836 decides absolute vs path on the raw href (RFC 4918 section 8.3) and quotes the decoded href without decoding it again.
AI usage: Claude Code imported my calendar events, debugged the failure, paired with me on the fix and wrote this report. The reproduction was run with caldav 3.5.0; Claude also saw the first case live against iCloud with 3.6.0, and the code is the same in 3.6.0 and master.
While I used AI to do a lot of the work here, this was found while solving a real problem I encountered while importing my own calendar as read-only events for an on-prem agent. This package made it much easier to accomplish that. I've put up a PR to fix it (#836), and have patched it locally to ensure it works and is well tested.
- Ngôn ngữ chính
- Python
- Star
- 412
- Fork
- 113
- Merge trung bình
- 10 giờ 34 phút
- Pull request đã merge (30 ngày)
- 75
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 78/100
python-caldav/caldav#792 ·
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 68/100
python-caldav/caldav#788 ·
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 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 56/100
python-caldav/caldav#842 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
python-caldav/caldav#841 · 1 bình luận ·
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ự
-
PluginProvider.storeInstance races and clobbers the dedup cache for concurrent loadsCó thể đã có người làm @Wilson0511 đã nhận hôm nay. Đang mởneeds-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 2 ngày
-
community documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/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 78/100
-
bug(sdk): add_toleration_json silently drops camelCase tolerationSeconds for static dict/list inputCó thể đã có người làm @ravikumar266 đã nhận hôm nay. Đang mởarea/sdk kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
kubeflow/pipelines#15347 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
predict_file with crop_model duplicates predictions once per imageCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
weecology/DeepForest#1445 ·