dakboard / Cloud-Platform

Feature requests, enhancements and anything you'd like to see in DAKboard!
https://dakboard.com
168 stars 39 forks source link

VALARM content in ICS calendars preventing normal processing #1949

Closed cocarrig closed 1 year ago

cocarrig commented 1 year ago

Describe the bug ICS content including VALARM results in a failure to render events in calendar blocks.

To Reproduce Steps to reproduce the behavior:

  1. Create Calendar block on dakboard screen.
  2. Enter ICS content with event containing 'VALARM' data like in below example:
    BEGIN:VEVENT
    BEGIN:VALARM
    TRIGGER;VALUE=DURATION:-PT30M
    ACTION:DISPLAY
    DESCRIPTION:DESCRIPTION
    END:VALARM
    DTSTART:20231107T010000Z
    DTEND:20231107T030000Z
    UID:4ff8e0b30170353ff3aa398658465143213213
    SUMMARY:SUMMARY
    DESCRIPTION:DESCRIPTION
    LOCATION:LOCATION
    STATUS:CONFIRMED
    DTSTAMP:20230606T040012Z
    CREATED:20230606T040012Z
    LAST-MODIFIED:20230927T000038Z
    TRANSP:OPAQUE
    END:VEVENT

Problematic fields specifically:

BEGIN:VALARM
END:VALARM

Expected behavior The VALARM fields should be ignored, and should not impact event processing.

Screenshots N/A

Additional context N/A

cocarrig commented 1 year ago

After further review, the ICS file in question has been compiled out of order, and does not follow ABNF form: https://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form

This will be closed as not-fixed.

Dan-Peck commented 1 year ago

To expand on that, here is the ICS/ICAL Specification where VALARM component blocks (alarmc) come into the definition:

4.6.1 Event Component

   Component Name: "VEVENT"

   Purpose: Provide a grouping of component properties that describe an
   event.

   Format Definition: A "VEVENT" calendar component is defined by the
   following notation:

     eventc     = "BEGIN" ":" "VEVENT" CRLF
                  eventprop *alarmc
                  "END" ":" "VEVENT" CRLF

The alarmc must appear at the end of the VEVENT, not the beginning.