Open Bug 1220745 Opened 9 years ago Updated 4 years ago

caldav 403 when accepting invitation

Categories

(Calendar :: Provider: CalDAV, defect)

Lightning 4.0.3
defect
Not set
major

Tracking

(Not tracked)

People

(Reporter: partoche, Unassigned)

Details

(Whiteboard: [patchlove])

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150806103657

Steps to reproduce:

Create an invitation : User A invites User B

User B receives an email with the meeting request, and has Buttons to Accept/Decline/Accept temporary

User B clicks on "ACCEPT"

Tested on lightning 3.3.3 with a CalDAV server.


Actual results:

A popup appears with "Modification failed", and the details show "403 forbidden"


Expected results:

User B's calendar is updated with the new status (accepted/decline/temporary)
The problem is that 
 - the server created the meeting request
 - lightning puts calendar items in cache but does not have this event in its cache yet
 - So lightning try to create the event, and the server says "conflict with this uid"

If i refresh the calendar before clicking on the ACCEPT button, it works fine.
Attached patch calDavCalendar.patch (obsolete) — — Splinter Review
Implements getEventById for the CalDAV provider.

Modify the code of getItem : if in cache, return cached item, otherwise run a search query on the server
Your Lightning version is rather old and not supported anymore. Does the problem still exists when using the current Lightning 4.0.3.1 release with Thunderbird 38.3?
Flags: needinfo?(partoche)
Yes, same problem, this part of lightning code is the same.
Flags: needinfo?(partoche)
Attached patch caldavImip-4.0.3.1.patch — — Splinter Review
Patch for lightning 4.0.3.1
Attached patch caldavImip.patch — — Splinter Review
patch for lightning 3.3.3
Attachment #8682043 - Attachment is obsolete: true
Sorry for the first patch, it's for another bug.

I attached the proposed patch for lightning 3.3.3 and lightning 4.0.3.1. 

Any review is appreciated.
Version: Lightning 3.3 → Lightning 4.0.3
Severity: normal → major
OS: Unspecified → All
Hardware: Unspecified → All
More information : the server is Oracle Communication Server, the name of the file holding the event on the server is NOT in the form <UID>.ics (with UID is the UID of the event).

Lightning does not have the event in cache, so it generates a file with the name <UID>.ics and PUTs it to the server, and the server says 'uid conflict'.

It seems that Google uses <UID>.ics to store the event, not sure for other caldav servers, in that case the problem may not appear.
Thank you for digging into this and proposing a patch. It will be cool to support REPORT.

I haven't really looked codewise at the patch, but I have some comments so far:

- you should build your patches based on repository code not on packaged files. See [1] for how to create a proper patch. Feature development is mostly for upcoming versions.

- if you take a bug, you should assign it to yourself to indicate your working on it and nobody else has to

- for requesting a review, set the review ? flag in the respective attachment details view of the bug and select a reviewer - if you don't know whom to select take a suggested one.

- you should consider that not every server supports calendar-query feature - if supported, this has neen advertised by the server before


[1] https://developer.mozilla.org/en-US/docs/Mercurial/Using_Mercurial#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
Assignee: nobody → partoche
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8682073 [details] [diff] [review]
caldavImip.patch

Unfortunately I'm not sure how to proceed here, removing myself from review.
Attachment #8682073 - Flags: feedback?(philipp)

I pm diesmo a year ago and no response

Status: ASSIGNED → NEW
Whiteboard: [patchlove]
Assignee: partoche → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: