From kyzer at kyzer.me.uk Wed Oct 15 04:40:29 2025 From: kyzer at kyzer.me.uk (Stuart Caie) Date: Wed, 15 Oct 2025 04:40:29 +0000 (UTC) Subject: [Kolab-devel] libkolab fails to read valid current-user-privilege-set from Radicale Message-ID: <9f7a32d83203421cfbb8d6742dea97ef@kyzer.me.uk> Hello there, This is a bug report for the calendar plugin. I tried to create an account on git.kolab.org, "kyz", and apparently I have to email this list to request it be allowed. I also send mail to this list already, without subscribing (it wasn't made clear), and there's no bounce indicating any error. I don't know whether you want the bug report here, or on git.kolab.org, so here it is, and I can repeat it if necessary. See also https://www.kyzer.me.uk/roundcube-caldav/ Problem: libkolab fails to read valid current-user-privilege-set from Radicale Details: To determine if a calendar is writable, libkolab issues a PROPFIND for various properties and processes them in kolab_dav_client.php getFolderPropertiesFromResponse() In that code, it makes the assumption that tag names will be prefixed. But Radicale doesn't write privileges like . Instead it declares its top level element like and all the child tags inherit that default namespace. is thus valid, but libkolab fails to accept it. Example: /calendar/.../.../ #ff0000ff "..." ... This is a fix for the issue: --- plugins/libkolab/lib/kolab_dav_client.php.orig 2025-10-14 12:34:56.0 +0000 +++ plugins/libkolab/lib/kolab_dav_client.php 2025-10-14 12:34:56.0 +0000 @@ -1046,16 +1046,16 @@ if ($grant_element = $ace->getElementsByTagName('grant')->item(0)) { foreach ($grant_element->childNodes as $privilege) { - if (strpos($privilege->nodeName, ':privilege') !== false && $privilege->firstChild) { - $grant[] = preg_replace('/^[^:]+:/', '', $privilege->firstChild->nodeName); + if ($privilege->localName == 'privilege' && $privilege->firstChild) { + $grant[] = $privilege->firstChild->localName; } } } if ($deny_element = $ace->getElementsByTagName('deny')->item(0)) { foreach ($deny_element->childNodes as $privilege) { - if (strpos($privilege->nodeName, ':privilege') !== false && $privilege->firstChild) { - $deny[] = preg_replace('/^[^:]+:/', '', $privilege->firstChild->nodeName); + if ($privilege->localName == 'privilege' && $privilege->firstChild) { + $deny[] = $privilege->firstChild->localName; } } } @@ -1075,8 +1075,8 @@ $rights = []; foreach ($set_element->childNodes as $privilege) { - if (strpos($privilege->nodeName, ':privilege') !== false && $privilege->firstChild) { - $rights[] = preg_replace('/^[^:]+:/', '', $privilege->firstChild->nodeName); + if ($privilege->localName == 'privilege' && $privilege->firstChild) { + $rights[] = $privilege->firstChild->localName; } } Regards Stuart From machniak at apheleia-it.ch Mon Oct 20 06:47:15 2025 From: machniak at apheleia-it.ch (Aleksander Machniak) Date: Mon, 20 Oct 2025 08:47:15 +0200 Subject: [Kolab-devel] libkolab fails to read valid current-user-privilege-set from Radicale In-Reply-To: <9f7a32d83203421cfbb8d6742dea97ef@kyzer.me.uk> References: <9f7a32d83203421cfbb8d6742dea97ef@kyzer.me.uk> Message-ID: W dniu 2025-10-15 06:40, Stuart Caie napisa?(a): > This is a bug report for the calendar plugin. I tried to create an > account on git.kolab.org, "kyz", and apparently I have to email this > list to request it be allowed. I also send mail to this list already, > without subscribing (it wasn't made clear), and there's no bounce > indicating any error. The signup is locked for now as we have problems with spam. Your request has been accepted. > I don't know whether you want the bug report here, or on git.kolab.org, > so here it is, and I can repeat it if necessary. See also > https://www.kyzer.me.uk/roundcube-caldav/ We'd prefer a ticket or a differential at git.kolab.org. > This is a fix for the issue: Thank you for the report and a fix. It makes sense. We indeed focus on making the plugin working with Kolab's Cyrus DAV server, but we accept any fixes for other DAV servers. I'll work on this when I fix my local networking problems. -- Aleksander Machniak Senior Software Engineer Apheleia IT AG PGP: 19359DC1 From kyzer at kyzer.me.uk Mon Oct 20 11:55:57 2025 From: kyzer at kyzer.me.uk (Stuart Caie) Date: Mon, 20 Oct 2025 11:55:57 +0000 (UTC) Subject: [Kolab-devel] libkolab fails to read valid current-user-privilege-set from Radicale In-Reply-To: References: <9f7a32d83203421cfbb8d6742dea97ef@kyzer.me.uk> Message-ID: <363113d2c7d79ef022add88c9bd17405@kyzer.me.uk> On 2025-10-20 07:47, Aleksander Machniak wrote: > We'd prefer a ticket or a differential at git.kolab.org. Thank you. I created https://git.kolab.org/T8445 Regards Stuart