CardDav not syncing with Radicale server if sync token is invalid
Categories
(Thunderbird :: Address Book, defect)
Tracking
(Not tracked)
People
(Reporter: abe5, Unassigned)
References
(Blocks 1 open bug)
Details
Steps to reproduce:
We are using Radicale CardDav Server 3.1.8 in Debian Bookwork for CardDav contacts storage. After some time sync stops working. When syncing contacts with the server it returns 403 error code if provided sync token is invalid (it is possible to reproduce this problem by removing token file from/var/lib/radicale/collections/collection-root/user/addressbook/.Radicale.cache/sync-token/ on the server).
There was a similar problem with Google Contact: https://bugzilla.mozilla.org/show_bug.cgi?id=1791183
Actual results:
Thunderbirds sends request to the server:
<sync-collection xmlns="DAV:" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:cs="http://calendarserver.org/ns/" xmlns:d="DAV:">
<sync-token>http://radicale.org/ns/sync/6413fcda2cee1686006df33be8aa1b5d3cafbb3b122bc45c9382ab10dc74bbd7</sync-token>
<sync-level>1</sync-level>
<prop>
<getetag/>
<card:address-data/>
</prop>
</sync-collection>
The server responds:
HTTP/1.1 403 Forbidden
Server: nginx
Date: Sun, 11 Aug 2024 15:56:43 GMT
Content-Type: text/xml; charset=utf-8
Content-Length: 87
Connection: keep-alive
Strict-Transport-Security: max-age=31536000; preload;
<?xml version='1.0' encoding='utf-8'?>
<error xmlns="DAV:"><valid-sync-token /></error>
Thunderbird does not try to download entire address book from the server. I tried to modify Radicale source code in https://github.com/Kozea/Radicale/blob/master/radicale/app/report.py (line 105) to change an http code from 403 to 400 but it did not help to solve the problem (Thunderbird tried to download address book in this case but it did not update the address book for some reason).
Expected results:
If a server responds with "<error xmlns="DAV:"><valid-sync-token /></error>" than thunderbird should redownload entire addressbook from the server and update the sync token.
Comment 1•9 months ago
|
||
So likely handling around here: https://searchfox.org/comm-central/rev/553cf06250377e8505ddb9d4decb4aaa0c2c1e8e/mailnews/addrbook/modules/CardDAVDirectory.sys.mjs#824
Updated•8 months ago
|
Description
•