Open Bug 465853 Opened 16 years ago Updated 2 years ago

Events with UID that contains '/' are not displayed

Categories

(Calendar :: Provider: CalDAV, defect)

defect

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: bernard.desruisseaux, Assigned: Fallen)

References

()

Details

(Whiteboard: [google-caldav][calconnect31-haspatch])

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081029 Firefox/2.0.0.18
Build Identifier: Lightning 0.9

While testing Lightning's CalDAV support with Google Calendar I noticed that a bunch of meetings weren't displayed in Lightning. Turns out the meetings that were not displayed had UID values that looks like:

UID:20070215-0030@example//abcdef012345@group.calendar.google.com

Most likely the '/' characters are causing issues here.

I can confirm that Google Calendar is actually returning those calendar components to Lightning and is properly percent encoding the '/' in their URL.

  <D:response>    <D:href>/calendar/dav/abcdef012345%40group.calendar.google.com/events/20070215-0030%40example%2F%2Fabcdef012345%40group.calendar.google.com.ics</D:href>
    <D:propstat>
      <D:status>HTTP/1.1 200 OK</D:status>
      <D:prop>
        <D:getetag>1-63327058174</D:getetag>
      </D:prop>
    </D:propstat>
  </D:response>

Reproducible: Always

Steps to Reproduce:
1. Create event with a UID value that contains a '/' in a CalDAV calendar collection.

Actual Results:  
Mozilla Lightning doesn't display the event.

Expected Results:  
Event should be displayed.

I've lost track of how these events were imported into the calendar.
I'm pretty sure the events originally had UID such as:

UID:20070215-0030@example

and that Google must have changed them automatically to

UID:20070215-0030@example//abcdef012345@group.calendar.google.com

It's possible that I actually moved those events from one calendar to another at some point and that would be when Google changes their UID... Don't know for sure. Anyway, only Google would know and care about this...
I'm not quite sure this is the reason, but I believe it may have to do with the way we separate the id from the rest of the url.

Needs investigation...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: qawanted
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [google-caldav]
Flags: blocking-calendar1.0+
Bernard, is it possible that you could invite me to the event with the strange id (kewisch.moz at gmail.com) ?

Otherwise, it would be nice if you could provide some more debug output so I can find out exactly where its failing...
Philipp,

I just added you as a "guest" to one of those events.
Thanks Bernard.

Some debugging shows that while the event is shown during the getetag query, it is not found on the server when doing the calendar-multiget. The same happens on a simple get.

I've extended http://code.google.com/p/google-caldav-issues/issues/detail?id=31 to track the issue on the server side.
Flags: blocking-calendar1.0+
Whiteboard: [google-caldav] → [google-caldav][depends-google-issue]
I think this needs to be tracked for 1.0, at least relnoted.
Flags: blocking-calendar1.0?
This is a Google Server issue against which we can't do a thing. I'm fine with relnoting though.
Flags: blocking-calendar1.0? → blocking-calendar1.0-
Keywords: relnote
I see also the phenomenon that VEVENT's with an UID containing a slash "/" are not displayed. However, I do not use any Google calendar, but the ical data is experted from phpScheduleIt and imported in DavICal server. 

Events with an UID like this are not displayed: 
UID:503ca6c43ab87&https://intranet.ist.local/scheduleit2/Web

After removing the slashes, the events are displayed. 
UID:503ca6c43ab87&https:==intranet.ist.local=scheduleit2=Web
UID:503ca6c43ab87&intranet.ist.local/scheduleit2/Web

I've also checked with RFC 2445 and 5545, and the forward slash ASCII(x2f) is part of the TSAFE-CHAR set. 

Therefore, I'm pretty sure this is not google server issue, but an issue of the mozilla calendar client. 

For testing, I've been using Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120724 Iceowl/1.0b1 Icedove/3.0.11
Another observation is, that this bug is only triggered when importing the calender using the format "CalDav"; when using the option "iCalendar (ICS)", there is no problem and all events are properly shown. 

Perhaps this can help fixing the problem.
(In reply to Alois Schloegl from comment #7)

.. of course, this does also not work, 

> UID:503ca6c43ab87&intranet.ist.local/scheduleit2/Web

It should read like this:  
UID:503ca6c43ab87&intranet.ist.local
Its been a while since I checked this, but I think it had to do with how Google responds to certain calendar queries that contain the UID.

Could you enable calendar.debug.log and calendar.debug.log.verbose in the advanced config editor, do an update (preferably on a new calendar that only has this one event, otherwise you will get a lot of logging) and post the log messages here? The ones that contain the UID should be enough.
Whiteboard: [google-caldav][depends-google-issue] → [google-caldav][depends-google-issue][calconnect25]
The attachment contains the log messages from the console. It contains two parts, the first part are the messages when a new calendar in davical was imported containing a single event with an UID containing slashes, namely:    

   UID:50697be34fee2&https://intranet.ist.local/scheduleit3/Web

The second part contains the log, when the same event but with 

   UID:50697be34fee2&intranet.ist.local

was important into davical, and then the calendar was reloaded. 
Only after the second step was performed, the event became visible in the client. 

Of course, the problem might be also on the server side (we are using davical  0.9.9.3 from debian squeeze). Either the mozilla client or davical does not handle forward slashes in a correct way.
Alois, it looks to me like the event is not even being returned in the XML, this means it might be a server issue. I think this deserves a new bug, possibly with davical.
Attached patch Always Encode Paths - v1 β€” β€” Splinter Review
Not requesting review for this yet, since there is more testing to do. Specifically:

* On a Davmail Server, where the item path contains the title, does adding an event with an "ΓΌ" in its name still work (compare bug 575782).

* Does upgrading with a cached calendar that saves the location path decoded work, i.e is it still possible to: change events client side, change events serverside then update, ...

* Any other regressions with different caldav servers?
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Whiteboard: [google-caldav][depends-google-issue][calconnect25] → [google-caldav][calconnect25]
Flags: needinfo?
Alois, can you give this patch a test run?
Flags: needinfo? → needinfo?(alois.schloegl)
I'm unable to comment on this patch. Sorry.
Flags: needinfo?(alois.schloegl)
Flags: blocking-calendar1.0-
Keywords: relnote
Whiteboard: [google-caldav][calconnect25] → [google-caldav][calconnect31]
Whiteboard: [google-caldav][calconnect31] → [google-caldav][calconnect31-haspatch]

Is there some update on this bug?

This error also appears, if I try to import an event from xing to a (remote) calendar on a owncloud server, as the ics-file contains a UID with slashes.

Flags: needinfo?(philipp)

Nothing new currently. The concept of the patch still applies, though it likely doesn't apply to code any longer. The change in that patch could potentially be breaking so I'd rather not land it without some sort of testsuite for caldav. Thank you for the additional use case though!

Flags: needinfo?(philipp)

Geoff added a CardDAV fake server. I suppose we could so something similar for CalDAV.
https://searchfox.org/comm-central/search?q=CardDAVServer.jsm&path=

What would it be testing? That saving an event works and viewing it later works with encoded path?

Oh hey, Paul and I wrote a testsuite that I forgot about :D https://searchfox.org/comm-central/source/calendar/test/unit/test_caldav_requests.js

A bunch of tests around decoding and encoding would be good. the multiget and getetag requests can have encoded or decoded paths, and subsequent modifications should use the right path. It would make sense to emulate the responses of a specific server that shows this behavior.

See Also: → 1264253
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: