Bug#773937: cyrus-caldav: [PATCH] Fix Icedove+Lightening PROPFIND for DAV

Daniel Dickinson debian at daniel.thecshore.com
Fri Dec 26 06:04:56 UTC 2014


Package: cyrus-caldav
Followup-For: Bug #773937

The actual bug is an upstream bug.  It turns out that cyrus' DAV implementation
only allows PROPFIND on / or /dav/ however Icedove+Lightening doesn't do the
discovery mechanism at the top level and instead requires a full path to the
calendar to be accessed, but still issues a PROPFIND on the URI.

Since cyrus only allows PROPFIND on / or /dav/ Icedove+Lightening will
always fail.

The attached patch (first again debian source tree, the second is only the
actual patch which goes in debian/patches) fixes this by allowing
PROPFIND on any URI beginning with /dav/ not only /dav/ itself.


diff -Naur cyrus-imapd-2.4-2.4.17+caldav~beta10.old/debian/changelog cyrus-imapd-2.4-2.4.17+caldav~beta10.new/debian/changelog
--- cyrus-imapd-2.4-2.4.17+caldav~beta10.old/debian/changelog	2014-12-25 22:48:18.656000000 -0500
+++ cyrus-imapd-2.4-2.4.17+caldav~beta10.new/debian/changelog	2014-12-26 00:39:18.452000000 -0500
@@ -1,3 +1,14 @@
+cyrus-imapd-2.4 (2.4.17+caldav~beta10-13~dfd1) unstable; urgency=low
+
+  * Fix DAV PROPFIND for Icedove/Thunderbird Lightening plugin
+    which applies PROPFIND at the calendar level instead of at
+    the top-level /dav/ URI (i.e. Lightening requires a full
+    path AND issues PROPFIND on the full path rather than as a
+    discovery mechanism at the top level.  Cyrus currently only
+    allows PROPFIND in / or /dav
+
+ -- Daniel Dickinson <debian at daniel.thecshore.com>  Thu, 25 Dec 2014 22:41:11 -0500
+
 cyrus-imapd-2.4 (2.4.17+caldav~beta10-12) unstable; urgency=medium
 
   * Add Breaks/Replaces for old cyrus-imapd-2.2 dummy packages 
diff -Naur cyrus-imapd-2.4-2.4.17+caldav~beta10.old/debian/patches/fix-icedove-thunderbird-lightening-propfind.patch cyrus-imapd-2.4-2.4.17+caldav~beta10.new/debian/patches/fix-icedove-thunderbird-lightening-propfind.patch
--- cyrus-imapd-2.4-2.4.17+caldav~beta10.old/debian/patches/fix-icedove-thunderbird-lightening-propfind.patch	1969-12-31 19:00:00.000000000 -0500
+++ cyrus-imapd-2.4-2.4.17+caldav~beta10.new/debian/patches/fix-icedove-thunderbird-lightening-propfind.patch	2014-12-25 22:59:18.336000000 -0500
@@ -0,0 +1,46 @@
+Description: Fix DAV PROPFIND for Icedove/Thunderbird Lightening
+   Fix DAV PROPFIND for Icedove/Thunderbird Lightening plugin
+   which applies PROPFIND at the calendar level instead of at
+   the top-level /dav/ URI (i.e. Lightening requires a full
+   path AND issues PROPFIND on the full path rather than as a
+   discovery mechanism at the top level.  Cyrus currently only
+   allows PROPFIND in / or /dav
+ .
+ cyrus-imapd-2.4 (2.4.17+caldav~beta10-12~dfd1) unstable; urgency=low
+ .
+   * Fix DAV PROPFIND for Icedove/Thunderbird Lightening plugin
+     which applies PROPFIND at the calendar level instead of at
+     the top-level /dav/ URI (i.e. Lightening requires a full
+     path AND issues PROPFIND on the full path rather than as a
+     discovery mechanism at the top level.  Cyrus currently only
+     allows PROPFIND in / or /dav
+Author: Daniel Dickinson <debian at daniel.thecshore.com>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: other
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- cyrus-imapd-2.4-2.4.17+caldav~beta10.orig/imap/httpd.c
++++ cyrus-imapd-2.4-2.4.17+caldav~beta10/imap/httpd.c
+@@ -3690,8 +3690,11 @@ static int meth_propfind_root(struct tra
+ 
+ #ifdef WITH_DAV
+     /* Apple iCal and Evolution both check "/" */
++    /* Thunderbird checks full path under /dav/... so limit
++       URI check to /dav/ portion of URI (if present)
++     */
+     if (!strcmp(txn->req_uri->path, "/") ||
+-	!strcmp(txn->req_uri->path, "/dav/")) {
++	!strncmp(txn->req_uri->path, "/dav/", 5)) {
+ 	/* Array of known "live" properties */
+ 	const struct prop_entry root_props[] = {
+ 
diff -Naur cyrus-imapd-2.4-2.4.17+caldav~beta10.old/debian/patches/series cyrus-imapd-2.4-2.4.17+caldav~beta10.new/debian/patches/series
--- cyrus-imapd-2.4-2.4.17+caldav~beta10.old/debian/patches/series	2014-12-25 22:48:18.660000000 -0500
+++ cyrus-imapd-2.4-2.4.17+caldav~beta10.new/debian/patches/series	2014-12-25 22:59:44.972000000 -0500
@@ -34,3 +34,4 @@
 parse-GUID-for-binary-appends-as-well.patch
 use-system-unicodedata.patch
 TLS-configuration.patch
+fix-icedove-thunderbird-lightening-propfind.patch
diff -Naur cyrus-imapd-2.4-2.4.17+caldav~beta10.old/imap/httpd.c cyrus-imapd-2.4-2.4.17+caldav~beta10.new/imap/httpd.c
--- cyrus-imapd-2.4-2.4.17+caldav~beta10.old/imap/httpd.c	2014-12-25 22:48:18.684000000 -0500
+++ cyrus-imapd-2.4-2.4.17+caldav~beta10.new/imap/httpd.c	2014-12-25 22:52:50.364000000 -0500
@@ -3690,8 +3690,11 @@
 
 #ifdef WITH_DAV
     /* Apple iCal and Evolution both check "/" */
+    /* Thunderbird checks full path under /dav/... so limit
+       URI check to /dav/ portion of URI (if present)
+     */
     if (!strcmp(txn->req_uri->path, "/") ||
-	!strcmp(txn->req_uri->path, "/dav/")) {
+	!strncmp(txn->req_uri->path, "/dav/", 5)) {
 	/* Array of known "live" properties */
 	const struct prop_entry root_props[] = {
 

[File2]

Description: Fix DAV PROPFIND for Icedove/Thunderbird Lightening
   Fix DAV PROPFIND for Icedove/Thunderbird Lightening plugin
   which applies PROPFIND at the calendar level instead of at
   the top-level /dav/ URI (i.e. Lightening requires a full
   path AND issues PROPFIND on the full path rather than as a
   discovery mechanism at the top level.  Cyrus currently only
   allows PROPFIND in / or /dav
 .
 cyrus-imapd-2.4 (2.4.17+caldav~beta10-12~dfd1) unstable; urgency=low
 .
   * Fix DAV PROPFIND for Icedove/Thunderbird Lightening plugin
     which applies PROPFIND at the calendar level instead of at
     the top-level /dav/ URI (i.e. Lightening requires a full
     path AND issues PROPFIND on the full path rather than as a
     discovery mechanism at the top level.  Cyrus currently only
     allows PROPFIND in / or /dav
Author: Daniel Dickinson <debian at daniel.thecshore.com>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: other
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- cyrus-imapd-2.4-2.4.17+caldav~beta10.orig/imap/httpd.c
+++ cyrus-imapd-2.4-2.4.17+caldav~beta10/imap/httpd.c
@@ -3690,8 +3690,11 @@ static int meth_propfind_root(struct tra
 
 #ifdef WITH_DAV
     /* Apple iCal and Evolution both check "/" */
+    /* Thunderbird checks full path under /dav/... so limit
+       URI check to /dav/ portion of URI (if present)
+     */
     if (!strcmp(txn->req_uri->path, "/") ||
-	!strcmp(txn->req_uri->path, "/dav/")) {
+	!strncmp(txn->req_uri->path, "/dav/", 5)) {
 	/* Array of known "live" properties */
 	const struct prop_entry root_props[] = {
 

-- System Information:
Debian Release: 8.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/5 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages cyrus-caldav depends on:
ii  cyrus-common  2.4.17+caldav~beta10-13~dfd1
ii  dpkg          1.17.22
ii  libc6         2.19-13
ii  libcomerr2    1.42.12-1
ii  libdb5.3      5.3.28-7~deb8u1
ii  libical1      1.0-1.1
ii  libkrb5-3     1.12.1+dfsg-16
ii  libsasl2-2    2.1.26.dfsg1-12
ii  libsqlite3-0  3.8.7.1-1
ii  libssl1.0.0   1.0.1j-1
ii  libwrap0      7.6.q-25
ii  libxml2       2.9.1+dfsg1-4
ii  zlib1g        1:1.2.8.dfsg-2+b1

cyrus-caldav recommends no packages.

cyrus-caldav suggests no packages.

-- no debconf information



More information about the Pkg-Cyrus-imapd-Debian-devel mailing list