ICS x-property should allow VALUE=type parameter (.value throws exception if present)

RESOLVED FIXED in 1.0b1

Status

defect
RESOLVED FIXED
12 years ago
9 months ago

People

(Reporter: m_wrede, Assigned: Fallen)

Tracking

unspecified
1.0b1
Bug Flags:
blocking-calendar1.0 +

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9a1) Gecko/20061006 Sunbird/0.3

Writing to ics-files (for example: dismiss an event) forces an error in the ics file. There are events that forces an alarm. After dismissing these alarms, these events are written. I'll get an error-message by Sunbird.

Lines in ics looks like:
LOCATION:Location
X-RAINLENDAR-LASTALARMACK;VALUE=DATE-TIME:20070119T080045Z
BEGIN:VALARM

No problem after changing from ; to :



Reproducible: Always

Steps to Reproduce:
1.Insert X-RAINLENDAR-LASTALARMACK;VALUE=DATE-TIME:20070119T080045Z
2.Start sunbird
3.
Actual Results:  
Error message:
Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [calIIcalProperty.value]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///D:/Programme/Mozilla.org/Sunbird/js/calItemBase.js :: anonymous :: line 625" data: no
Summary: ics-objects with semicolons crashes → ics object with semicolon causes exception
Reporter, can you attach an ICS calendar file with a single event to this bug which produces the error?
(Reporter)

Comment 2

12 years ago
This ics-file was updated by Rainlendar.

Updated

12 years ago
Attachment #252595 - Attachment mime type: application/octet-stream → text/calendar

Comment 3

12 years ago
The rfc2445 grammar specifies that an x-property (s4.8.8.1) can only have an x-name, and parameters must be xparams (s4.2) or they must be the LANGUAGE parameter (s4.2.10).  

  x-prop     = x-name *(";" xparam) [";" languageparam] ":" text CRLF

  xparam     = x-name "=" param-value *("," param-value)

  x-name             = "X-" [vendorid "-"] 1*(ALPHA / DIGIT / "-")  

While I don't agree with rfc2445 that it should be necessary for x-property parameters to be xparams, since that is how rfc2445 is specified, maybe Rainlendar should use an x-name parameter name to be most compatible.  For example, use X-VALUE instead of VALUE.  Is that accepted by Sunbird?

Comment 4

12 years ago
1. Verified that changing VALUE to X-VALUE in the ics file prevents the exception.

2. A recent revision of rfc2445 (dated just two days before this bug was filed) permits an x-prop to contain a parameter, not just an xparam.

  x-prop = x-name *(";" parameter) ":" text CRLF

http://tools.ietf.org/html/draft-ietf-calsify-rfc2445bis-04#section-3.8.8.1

So I'll confirm and change the summary
old: ics object with semicolon causes exception
new: ICS x-property should allow parameter, not just x-parameter (.value throws exception)

Next step:  Someone comfortable working on libical needs to find why this error is thrown, maybe with a debugger.  (Since it seems to be thrown by calICalProperty.value, it is not thrown from the parser.)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: ics object with semicolon causes exception → ICS x-property should allow parameter, not just x-parameter (.value throws exception)
that update on a draft for a followup rfc still says that the value type is text. So a value type of datetime is still not permitted.

Comment 6

12 years ago
(Looks like draft 05 dated 29 Jan 2007 was put up recently, but no changes relevant to this discussion were made.)

(In reply to comment #5)
> that update on a draft for a followup rfc still says that the value type is
> text. So a value type of datetime is still not permitted.
> 

1. x-parameter type

If you're referring to 

  3.8.8.1. Non-standard Properties
  http://tools.ietf.org/html/draft-ietf-calsify-rfc2445bis-05#section-3.8.8.1
  ...
  Value Type:  TEXT

Note the clarification a few paragraphs later:

      ... The value type for
      this property is TEXT.  Optionally, the value type can be any of
      the other valid value types.

I think the intent is that TEXT is the default value type, i.e., the value type if no ";VALUE=..." parameter is specified.

The x-prop example at the end of the section (updated in draft 04 to give an example of a param) shows a use where the default value type TEXT is overridden with value type URI, showing that a VALUE= type parameter is permitted.

   Example:  The following might be the ABC vendor's extension for an
      audio-clip form of subject property:

        X-ABC-MMSUBJ;VALUE=URI;FMTTYPE=audio/basic:http://www.example.
         org/mysubj.au

2. Sunbird error on VALUE parameter only

On a file with the example x-property above with type VALUE=URI, Sunbird throws the same exception.  So the error is not specific to the DATE-TIME type.

The exception is not thrown for all parameters (e.g., with just the FMTTYPE parameter it does not throw an exception), so the problem appears to be specific to the VALUE parameter.

Updating summary:
old: ICS x-property should allow parameter, not just x-parameter (.value throws exception)
new: ICS x-property should allow VALUE=type parameter (.value throws exception)
Summary: ICS x-property should allow parameter, not just x-parameter (.value throws exception) → ICS x-property should allow VALUE=type parameter (.value throws exception if present)

Comment 7

12 years ago
Apple's iCal can create lines like:

X-WR-ITIPSTATUSML;VALUE=TEXT:UNCLEAN

which also seems to cause this same error.  Deleting that single line allows the calendar to load without a problem.
Duplicate of this bug: 464629
Flags: blocking-calendar1.0?
Flags: in-testsuite?
OS: Windows XP → All
Hardware: PC → All
(Assignee)

Comment 9

10 years ago
I think we can block on this. We should get rid of the exception at least, if its easy then we can also see if we can properly roundtrip this.
Flags: blocking-calendar1.0? → blocking-calendar1.0+
(Assignee)

Comment 10

10 years ago
Posted patch Fix - v1Splinter Review
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #369895 - Flags: review?(dbo.moz)
Comment on attachment 369895 [details] [diff] [review]
Fix - v1

patch looks good; r=dbo
Attachment #369895 - Flags: review?(dbo.moz) → review+
(Assignee)

Comment 12

10 years ago
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/1b2092abab94>

-> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Target Milestone: 1.0 → 1.0b1
Duplicate of this bug: 561210
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.