View Issue Details

IDProjectCategoryView StatusLast Update
0002574SOGoBackend Calendarpublic2014-02-27 09:53
ReporterJens Erat Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version2.1.1b 
Summary0002574: No colors selectable if ressource ID contains space character
Description

After migrating some data to SOGo using the CalDAV interface, we experienced an issue with some resources for which we cannot select a resource color. All these Calendars have in common that they include whitespace in their name. We have also been able to reproduce the problem using the restore feature in sogo-tool.

Steps To Reproduce
  • Edit backup containing calendar

  • Change the ressource ID to include whitespace, for example

    "/Users/user42/Calendar/DEAD BEEF" = {
    [snip]
    };

  • Import this folder using sogo-tool: sogo-tool restore -f 'Calendar/DEAD BEEF' backup.1 user42

  • A new calendar will be created, not having a color set ("transparent"), also no background for appointments

  • Try to change the color of the calendar: Will not be stored

Additional Information

If another calendar with ID DEAD exists, its color will be changed and also used for calendar with ID DEAD BEEF (SOGo seems to cut everything behind that space).

TagsNo tags attached.

Activities

ludovic

ludovic

2014-02-04 20:50

administrator   ~0006496

How did you end up having a space in the calendar ID? If it's by messing around the data, you're shooting yourself in the foot.

Christian Mack

Christian Mack

2014-02-05 12:58

developer   ~0006500

We got the space by creating a calendar via davfs.
We migrated complete calendars from Zimbra to SOGo with a script.
The original calendar had the space in its name.

Jens Erat

Jens Erat

2014-02-05 18:52

reporter   ~0006504

We created these calendars using DAV, by creating directories (which might be not valid regarding the standard, but worked fine nonetheless). It seems this is a way to sink invalid data into SOGo and those invalid UIDs might be better subject to verification before being accepted (and breaking later in other places).

We might better create calendars using the "official" way be sending an MKCALENDAR command using curl in future.

Anyway, in my reading UIDs containing spices are valid as defined by RFC 5545.

http://tools.ietf.org/search/rfc5545#section-3.8.4.7

uid        = "UID" uidparam ":" text CRLF

http://tools.ietf.org/search/rfc5545#section-3.3.11

text       = *(TSAFE-CHAR / ":" / DQUOTE / ESCAPED-CHAR)
TSAFE-CHAR = WSP / %x21 / %x23-2B / %x2D-39 / %x3C-5B / %x5D-7E / NON-US-ASCII

http://tools.ietf.org/html/rfc5234#appendix-B.1

WSP            =  SP / HTAB
SP             =  %x20

It might be well possible that I read over some limitations, but the grammar definitely includes the space character.

Issue History

Date Modified Username Field Change
2014-01-10 12:56 Jens Erat New Issue
2014-02-04 20:50 ludovic Note Added: 0006496
2014-02-05 12:58 Christian Mack Note Added: 0006500
2014-02-05 18:52 Jens Erat Note Added: 0006504