caldav 403 when accepting invitation

ASSIGNED
Assigned to

Status

Calendar
Provider: CalDAV
--
major
ASSIGNED
2 years ago
2 years ago

People

(Reporter: diesmo, Assigned: diesmo)

Tracking

Lightning 4.0.3

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

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)
(Assignee)

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.
(Assignee)

Comment 2

2 years ago
Created attachment 8682043 [details] [diff] [review]
calDavCalendar.patch

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 4.0.3.1 release with Thunderbird 38.3?
Flags: needinfo?(partoche)
(Assignee)

Comment 4

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

Comment 5

2 years ago
Created attachment 8682072 [details] [diff] [review]
caldavImip-4.0.3.1.patch

Patch for lightning 4.0.3.1
(Assignee)

Comment 6

2 years ago
Created attachment 8682073 [details] [diff] [review]
caldavImip.patch

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

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 4.0.3.1. 

Any review is appreciated.
(Assignee)

Updated

2 years ago
Version: Lightning 3.3 → Lightning 4.0.3
(Assignee)

Updated

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

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


[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

Updated

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