SOGo - BTS - SOGo
View Issue Details
0001758SOGoWeb Calendarpublic2012-04-05 09:212016-07-15 15:01
gazda 
 
normalfeaturealways
newopen 
1.3.14 
 
0001758: Cannot import an .ics with binary attachment
I cannot import the attached file using SOGo web client. It works when it I manually remove all ATTACH attributes. Is there something wrong with the file itself? I do not see any error message either in the SOGo backend log or in the web client. Web client simply says "No event was imported". I found no way to find out what is wrong with the file.
No tags attached.
? outlook.ics (308,031) 2012-04-05 09:21
https://sogo.nu/bugs/file_download.php?file_id=566&type=bug
Issue History
2012-04-05 09:21gazdaNew Issue
2012-04-05 09:21gazdaFile Added: outlook.ics
2012-04-10 08:14Christian MackNote Added: 0003701
2012-04-10 08:19Christian MackNote Edited: 0003701
2012-04-10 09:04gazdaNote Added: 0003705
2012-04-10 09:48Christian MackSeveritymajor => feature
2012-04-10 09:56Christian MackNote Added: 0003707
2012-04-10 11:12gazdaNote Added: 0003708
2012-04-10 12:31Christian MackNote Added: 0003710
2015-09-01 07:54thierryNote Added: 0008882
2016-07-15 15:01peterbeckNote Added: 0010499

Notes
(0003701)
Christian Mack   
2012-04-10 08:14   
(edited on: 2012-04-10 08:19)
Binary attachments are not supported for events or tasks in SOGo, nor Thunderbird/Lightning.
You only can attach URLs to a file, not the file itself.


The iCalendar standard allows but discourages the use of binary attachments.
RFC 2445:
" ...
4.1.3 Binary Content

   Binary content information in an iCalendar object SHOULD be
   referenced using a URI within a property value. That is the binary
   content information SHOULD be placed in an external MIME entity that
   can be referenced by a URI from within the iCalendar object. In
   applications where this is not feasible, binary content information
   can be included within an iCalendar object, but only after first
   encoding it into text using the "BASE64" encoding method defined in
   [RFC 2045]. Inline binary contact SHOULD only be used in applications
   whose special circumstances demand that an iCalendar object be
   expressed as a single entity. A property containing inline binary
   content information MUST specify the "ENCODING" property parameter.
   Binary content information placed external to the iCalendar object
   MUST be referenced by a uniform resource identifier (URI).

   The following example specifies an "ATTACH" property that references
   an attachment external to the iCalendar object with a URI reference:

     ATTACH:http://xyz.com/public/quarterly-report.doc [^]

   The following example specifies an "ATTACH" property with inline
   binary encoded content information:

     ATTACH;FMTTYPE=image/basic;ENCODING=BASE64;VALUE=BINARY:
      MIICajCCAdOgAwIBAgICBEUwDQYJKoZIhvcNAQEEBQAwdzELMAkGA1U
      EBhMCVVMxLDAqBgNVBAoTI05ldHNjYXBlIENvbW11bmljYXRpb25zIE
        <...remainder of "BASE64" encoded binary data...>
..."


Are you sure you want all sorts of files on your calendar server?

I don't, because of the following reasons:
1) Binary data in an event is synchronised via CalDAV with the event as one object. So every client has to download it, before displaying the event.
1a) Even people who never look at this file have to download it.
1b) It also goes to every Smartphone connected to this calendar.
1c) Every change (e.g. a new note, date or subject) to your event triggers a complete download on every client for it.
1d) Every client has to hold all binary data from all events of an calendar (or at least a period of time) in his memory when displaying events.

2) The calendar server has to handle the additional bandwidth and storage for these files.

3) You can't scan these files for viruses on the calendar server. Spreading malicious content will be hard to prevent.

(0003705)
gazda   
2012-04-10 09:04   
Thanks for your detailed reply, Christian.

> Binary attachments are not supported for events or tasks
> in SOGo, nor Thunderbird/Lightning.

I am fine with the fact, that SOGo does not support binary attachments - at least now, when I know it. It would be nice if SOGo itself could tell me that that it does not support binary attachments when I try to import one. And it would be nice if SOGo would offer me an option to strip/ignore the binary attachments or even better, an option to detach/save the binary attachments on import.

The attached .ics file comes from an external site. It is a an invitation to a training and the attachment is a PDF registration form. Is there a way how my users could simply extract those forms out of the invitation?

Thanks again,

gazda
(0003707)
Christian Mack   
2012-04-10 09:56   
Sorry, but I don't know an easy way to extract it.

I could do it manually, by copying the base64 part, decode it and save it as PDF file.
But that's not what an end user would do.
(0003708)
gazda   
2012-04-10 11:12   
Thanks again for your prompt reply, Christian.

> Sorry, but I don't know an easy way to extract it.

> I could do it manually, by copying the base64 part,
> decode it and save it as PDF file.
> But that's not what an end user would do.

OK, I accept your reply for extracting/detaching.

But how about informing the user that binary attachments are not supported when he tries to import one?
And how about opting the user for ignoring the the binary part?

Best,

gazda
(0003710)
Christian Mack   
2012-04-10 12:31   
Because of these open issue I changed this bug report to an enhancement request.
There should be a way in order to handle binary attachments.
(0008882)
thierry   
2015-09-01 07:54   
Hi,

A better way to do that as binary attachment is not recommended, would be to support extra linking on external storage like filelink do for email large attachments (https://support.mozilla.org/en-US/kb/filelink-large-attachments [^]).

It would be nice to have into SOGo (and lightning) a button "attach file". When user "attach" : app uploads file via filelink and add url attachment in task or event.

What do you think about that? Is it easily possible? It would be a very very important and expected new feature, isn't it?

Best regards,

Thierry
(0010499)
peterbeck   
2016-07-15 15:01   
afaik this is "by design":

RFC 2445 https://www.ietf.org/rfc/rfc2445.txt: [^]

> ATTACHMENTS - An iCalendar object can include references to Uniform Resource Locators that can be programmed resources.

No mentions about binary attachments, just URL...