Closed Bug 496699 Opened 15 years ago Closed 13 years ago

malformed URL in ATTACH property leads to exception, calendar marked as 'temporarily not available'

Categories

(Calendar :: Provider: ICS/WebDAV, defect)

Sunbird 0.9
x86
Windows Vista
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 632352

People

(Reporter: bahnhof, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.8.1.18pre) Gecko/20080917 Sunbird/0.9

On the page http://portal.mytum.de/termine/index_html by the TU Munich you can find an activity calender, which can be subscribed to under http://portal.mytum.de/termine/export_ical .
Since the update to version 0.9 of Sunbird, the program shows on the right of the calender an exclamation mark that says: "Calender is temporarily not available... it works fine with the Windows-Calender and version 0.8 of Sunbird. 
It might be because the link doesn't directly link to the .ics file?

Reproducible: Always

Steps to Reproduce:
1. Does it work with version 0.8 of Sunbird?
2. Does it work with Windows Calender?
Actual Results:  
1. Yes, with version 0.8 of Sunbird it works fine
2. Yes, with Windows Calender it works fine

Expected Results:  
open the linked calender file as with the previous version of Sunbird
Subscribing to the given calendar throws the following errors:

Sunbird 0.9 (20080917):
=======================

Warning: There has been an error reading data for calendar: termine. It has been placed in read-only mode, since changes to this calendar will likely result in data-loss.  You may change this setting by choosing 'Edit Calendar'. Error code: 0x80570021. Description: [Exception... "'[JavaScript Error: "this.setProperty is not a function" {file: "file:///E:/sunbird-0.9/js/calAttachment.js" line: 162}]' when calling method: [calIAttachment::icalProperty]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: file:///E:/sunbird-0.9/js/calItemBase.js :: anonymous :: line 694"  data: yes]

Sunbird 1.0pre (20090605):
==========================

Error: [Exception... "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]"  nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)"  location: "JS frame :: file:///E:/sunbird-trunk/sunbird/calendar-js/calUtils.js :: makeURL :: line 345"  data: no]

It seems that Sunbird fails on incomplete ATTACH URLs like:
    ATTACH;VALUE=URL:www.fotowettbewerb-tum.de
that misses the http:// part or invalid URLs like:
    ATTACH;VALUE=URL:http://www.vt.bv.tum.de und http://www.deutsches-museum.de/verkehrszentrum/information/vortraege

Is this allowed according to the iCalendar specification at all?
   Format Definition:  This value type is defined by the following
      notation:

        uri = <As defined in section 3 of [RFC3986]>

   Description:  This value type might be used to reference binary
      information, for values that are large, or otherwise undesirable
      to include directly in the iCalendar object.

      Property values with this value type MUST follow the generic URI
      syntax defined in [RFC3986].

http://tools.ietf.org/html/rfc3986#section-3

so the answer is no, an URI must contain a scheme
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Too bad that it won't be fixed, since it worked with the old version and it works with some alternative programs I hoped that I could continue using Sunbird for my calenders.
Reverting WONTFIX. I agree the data from the iCalendar file is not valid, but this bug reports an issue which could be seen in the error console. So, we should evaluate if we can gracefully handle this situation, especially propagating this error for improved reporting to the user.
Status: RESOLVED → UNCONFIRMED
Resolution: WONTFIX → ---
Reporter, you should try to contact the mytum.de site operators, inform them about the issue and let them create valid iCalendar files.

Sunbird could ignore the invalid entries. But this is kind of dataloss and therefore no acceptable solution.
Summary: export_ical external calender "temporarily not available" by the TUM Technical University of Munich Website → malformed URL in ATTACH property leads to exception, calendar marked as 'temporarily not available'
Version: unspecified → Sunbird 0.9
I contacted the operator. 

He said that the they don't check the data relating to the objects which is entered by the users. 
He will start checking if users enter valid URLs. 

Later, he wrote again:
he now added an explicit http:// so that the URI now is conform, but according to his test with Sunbird it still doesn't work (he doesn't get any message for example in the error console what's wrong so there is no way for debugging); 
it works with Apple iCal he says (but there are no error messages, too).  

All in all, he doesn't know exactly what the problem is so he can't fix it.
Reporter, it seems all issues has been fixed on the server creating the .ics file ? I can successfully subscribe to the calendar using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1pre) Gecko/20090710 Calendar/1.0pre.
Thanks for the info. 

I tried it with my regular Sunbird 0.9 and it still doesn't work. Then I tried the new 1.0pre and it seems to work fine. 
I don't know if it is/was a problem of Sunbird 0.9 or the server creating the .ics file. 
Anyway, hopefully both continue to harmonize in the future.
We have a calendar created by Lightning 0.9 and 1.0pre which contains "ATTACH:about:blank" and also this gem:

ATTACH;VALUE=BINARY;ENCODING=BASE64;ID=TEXT.htm:ERROR: No Value

Removing the latter from the ICS is a simple work-around for the exception thrown. (See comment #1) Is this a separate bug, that Lightning allows (or has allowed) creating ATTACH fields like this which break the ICS parser?
Blocks: 504852
We seem to throw an error when calling makeURL when the url is invalid, we should make sure this error is caught. Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #11)
This also seems to be the case if the attachment is a binary attachment associated with a calendar entry retrieved from a CalDav server. In the past Lightning used to 'cleanly' ignore binary attachments. Now (1.0b2) it throws this error and fails to process the rest of the CalDav response.

Looking at calAttachment.js and calStorageCalendar.js it's clear a URL tries to be formed from any type of attachment value.
This bug will be fixed with bug:
Status: NEW → RESOLVED
Closed: 15 years ago13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: