caldav 403 when accepting invitation

Assigned to


Provider: CalDAV
2 years ago
2 years ago


(Reporter: diesmo, Assigned: diesmo)


Lightning 4.0.3



(2 attachments, 1 obsolete attachment)



2 years ago
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)

Comment 1

2 years ago
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.

Comment 2

2 years ago
Created attachment 8682043 [details] [diff] [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

Comment 3

2 years ago
Your Lightning version is rather old and not supported anymore. Does the problem still exists when using the current Lightning release with Thunderbird 38.3?
Flags: needinfo?(partoche)

Comment 4

2 years ago
Yes, same problem, this part of lightning code is the same.
Flags: needinfo?(partoche)

Comment 5

2 years ago
Created attachment 8682072 [details] [diff] [review]

Patch for lightning

Comment 6

2 years ago
Created attachment 8682073 [details] [diff] [review]

patch for lightning 3.3.3
Attachment #8682043 - Attachment is obsolete: true

Comment 7

2 years ago
Sorry for the first patch, it's for another bug.

I attached the proposed patch for lightning 3.3.3 and lightning 

Any review is appreciated.


2 years ago
Version: Lightning 3.3 → Lightning 4.0.3


2 years ago
Severity: normal → major
OS: Unspecified → All
Hardware: Unspecified → All

Comment 8

2 years ago
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.

Comment 9

2 years ago
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



2 years ago
Assignee: nobody → partoche
Ever confirmed: true
Attachment #8682073 - Flags: feedback?(philipp)
You need to log in before you can comment on or make changes to this bug.