[#12141] Namespace matching bug
Summary Namespace matching bug
Queue Kolab
Type Bug
State Assigned
Priority 1. Low
Owners thomas.jarosch@intra2net.com
Requester matthias@familie-burghardt.net
Created 2013-03-26 (2771 days ago)
Due
Updated 2013-08-27 (2617 days ago)
Assigned 2013-08-27 (2617 days ago)
Resolved
Milestone
Patch No

Comments
matthias@familie-burghardt.net 2013-03-26 13:45:45
The function matches() in 
Kolab/Storage/Folder/Namespace/Element.php:102 gives wrong result if 
one namespace name is a left-anchored substring of another, e.g. 
'kolab' and 'kolab_shared'.

Thomas Jarosch <thomas.jarosch@intra2net.com> 2013-03-26 14:00:20
> The function matches() in 
> Kolab/Storage/Folder/Namespace/Element.php:102 gives wrong result if 
> one namespace name is a left-anchored substring of another, e.g. 
> 'kolab' and 'kolab_shared'.

Yes, correct, it looks like a bug.

How did you discover this bug?
Any easy steps to reproduce it?


matthias@familie-burghardt.net 2013-03-26 21:33:42
>
> How did you discover this bug?
> Any easy steps to reproduce it?
>
Sharing a calendar produces a "Share id ... not found" exception in 
any account other than the calendar owner, when opening kronolith

Thomas Jarosch <thomas.jarosch@intra2net.com> 2013-03-27 08:41:14
>> Any easy steps to reproduce it?
>>
> Sharing a calendar produces a "Share id ... not found" exception in 
> any account other than the calendar owner, when opening kronolith

This works fine for me. I'm using cyrus imapd 2.3.16, which IMAP 
server are you using?

My own calendar is as "INBOX/Kalender" and will be seen by other users 
as "user/something/Kalender".

I'm asking these details as I want to write a unit test that fails for 
your case, fix the code and then run the test again. Thanks.


Thomas Jarosch <thomas.jarosch@intra2net.com> 2013-04-17 12:37:42
ping matthias ;)


matthias@familie-burghardt.net 2013-04-24 11:29:04
>
> This works fine for me. I'm using cyrus imapd 2.3.16, which IMAP 
> server are you using?
>
> My own calendar is as "INBOX/Kalender" and will be seen by other 
> users as "user/something/Kalender".

I'm using dovecot 2. Maybe it depends on the order in which the 
namespaces are reported by the server. Mine said
* NAMESPACE (("" "/")("kolab/" "/")) (("kolab_shared/" "/")) 
(("kolab_public/" "/"))
The own calendar was then
* LIST (\HasNoChildren) "/" "kolab/Kalender"
ans was seen by other users as
* LIST (\HasNoChildren) "/" "kolab_shared/[my user name]/Kalender"
Maybe it was also due to the non-standard Kolab setup that I did. 
Anyway, I changed "kolab" to "kolab_personal" so the error has vanished.

HTH
Matthias