Repository navigation
Conversation
Tool-body calendar_id/event_id were interpolated raw into Google Calendar API paths at every tool handler. Legitimate calendar ids contain '#' (e.g. en.usa#[email protected]), which truncates the request URL and breaks those calendars; '/' or '..' in either id could also rewrite the request path under the API host. path_segment() percent-encodes each id (quote with safe="") at the seven interpolation sites covering list/create/get/update/delete. Verified: test_path_encoding.py drives the real tool handlers with a recorded requests stub. On old code the holiday-calendar id produces a URL containing a literal '#' (assertion fails); with the fix ids arrive percent-encoded and plain ids pass through unchanged. 3/3 pass. Failure-Class: none
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
… tests Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Thanks @Da7em-T — this is a solid, well-scoped fix, and the follow-ups from the earlier review round (dot-segment rejection, the requests stub in the hermetic loader, create/update coverage) are all addressed in b05f811. Verified on this head:
On the red checks: none of them come from this PR. Dart Analyze & Tests fails on compile errors in Since this changes URL/input validation on an authenticated Google Calendar API surface, it should get maintainer sign-off before merge — the code looks right to me, but that surface warrants human eyes. Leaving a positive signal for human maintainer review. This review was written by AI on behalf of David |
kodjima33
left a comment
There was a problem hiding this comment.
Google Calendar id path-encoding fix (# truncation / path traversal), well-tested. CI: Dart Analyze & Tests fails (stale base, unrelated) and Desktop Swift tests also red on this frozen base despite zero Swift changes in diff — approved, not merged, needs rebase for clean CI.
|
Follow-up verification on this head (b05f811), adding execution evidence on top of the approval above:
On the red CI lanes: Dart Analyze & Tests fails with a compile-time type error in app/test/widgets/chat_content_blocks_test.dart (ActionItemsFetcher mismatch) and the Desktop Swift lanes fail on the test-step time budget — this diff touches no Dart or Swift files, and both failures reproduce from the base, so a rebase should clear them. Thanks @Da7em-T — the # truncation vs path-injection distinction is exactly right, and rejecting dot segments outright instead of encoding them is the correct call. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Path-segment encoding fix for Google Calendar tool handlers; real calendar ids contain # which truncated requests, and unencoded ids allowed path rewriting; well tested.
|
Status update for @Da7em-T: the base breakage that kept this branch's Dart lane red has been fixed upstream. Nothing new on re-verification of b05f811: all by AI on behalf of David |
|
Keeping this open on DIRTY + Dart Analyze red; gcal path-id encode + tests; kodjima APPROVE ≠ merge. kodjima APPROVE is the size gate, not maintainer merge. I am not approving or merging this SHA. |
kodjima33
left a comment
There was a problem hiding this comment.
Real bug: unencoded calendar/event ids in Google Calendar API paths truncate on legitimate '#'-containing calendar ids and allow path rewriting via '/'/'..'. Scoped percent-encoding fix with hermetic tests. Only red check is the same pre-existing unrelated Dart compile error.
|
Google Calendar on main still builds event paths with raw ids. This head quotes them with — Astar, on behalf of @aryanorastar |
|
Keeping this open. Not approving — Astar, on behalf of @aryanorastar |
Summary
calendar_idandevent_idcome from the tool request body and were interpolated raw into Google Calendar API paths at every tool handler (list/create/get/update/delete — 7 sites).#— e.g.en.usa#[email protected]. A literal#turns the rest of the URL into a fragment, truncating the request path to/calendars/en.usa— holiday/shared calendars silently hit the wrong endpoint./or..in either id could rewrite the request path under the API host (e.g.event_id=x/../../acl/owner).path_segment()percent-encodes each id (quote(..., safe="")) at each interpolation site.Verification
plugins/omi-google-calendar-app/test_path_encoding.py(new, hermetic, registered asgcal-path-segment-encoding-testsin.github/checks-manifest.yaml) drives the real tool handlers with a recordedrequestsstub:tool_list_eventswithcalendar_id=en.usa#[email protected]: old code produces a URL containing a literal#(test fails — request path truncated); fixed code sendsen.usa%23holiday%40...tool_delete_eventwithevent_id=x/../../acl/owner: fixed code keeps one/events/segment and no literal..path partstool_get_eventwithprimary/evt_1: unchanged/calendars/primary/events/evt_13/3 pass on the fix; the
#truncation test fails on the original code.Failure-Class: none