RawDataState.get_uid() returns a VALARM's UID when it comes before the event's own UID
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
caldav/datastate.pyから始め、Issueで説明されている完全な解析時の動作およびIcalendarState.get_uid()の動作と、RawDataState.get_uid()を比較してください。アラームがイベントより前にあるUIDの例を再現し、その後、未加工UIDの検索に関する既存のテストを確認してください。この例で未解析のアクセサーがevent-1を返し、解析後のアクセサーと一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Disclaimer: AI-generated text below the line, generated by Claude Opus 5.5, from the prompts:
Do a review of PR#787
[file the finding found]
RawDataState.get_uid() (caldav/datastate.py), the cheap accessor behind .id of an object that is not parsed yet, takes the first line matching ^UID: anywhere in the data. RFC 9074 section 4 allows a UID inside a VALARM, so if the VALARM comes before the event's own UID line, .id returns the alarm's UID:
BEGIN:VCALENDAR
BEGIN:VEVENT
BEGIN:VALARM
UID:alarm-1
ACTION:DISPLAY
TRIGGER:-PT5M
END:VALARM
UID:event-1
DTSTART:20260101T000000Z
END:VEVENT
END:VCALENDAR
RawDataState(data).get_uid() returns alarm-1. The full-parse fallback (DataState.get_uid()) and IcalendarState.get_uid() only look at VEVENT/VTODO/VJOURNAL/VFREEBUSY, and return event-1 — so .id changes once the object gets parsed.
The consequences are those fixed for folded UIDs in https://github.com/python-caldav/caldav/pull/787: get_object_by_uid() filters out the right object, save(no_overwrite=True) / save(no_create=True) check the wrong UID. Most clients write the UID before any VALARM, so this is likely rare in practice.
A possible fix: only accept a UID: line when no BEGIN:VALARM (or any other subcomponent) is open at that point, or fall back to the full parse whenever the data contains BEGIN:VALARM before the first UID:.
- 主要言語
- Python
- スター
- 412
- フォーク
- 113
- 平均マージ
- 11時間 37分
- マージ済み PR(30日)
- 50
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-caldav/caldav のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
python-caldav/caldav#799 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
python-caldav/caldav#792 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
python-caldav/caldav#687 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 75/100
python-caldav/caldav#796 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
python-caldav/caldav#795 ·
メンテナーはふだん 1 日以内に返信
python-caldav/caldav の issue をすべて見る
似ている issue
-
good first issue tools
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug deferred domain:ci P1
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
docling-project/docling-mcp#147 ·
-
issue: A pipe model's Valves button ignores the Allow Chat Valves permission対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug confirmed issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
open-webui/open-webui#32771 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Scheduled Security Scan is failing on main対応中かも @pkupt が今日担当しました。 オープンsecurity-scan-failure
難易度 1/5 1〜3時間 初心者へのやさしさ 74/100
semantica-agi/semantica#2045 ·
メンテナーはふだん 2 日以内に返信