Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check before accessing event attributes on caldav #741

Closed
MelissaAutumn opened this issue Nov 15, 2024 · 2 comments · Fixed by #751
Closed

Check before accessing event attributes on caldav #741

MelissaAutumn opened this issue Nov 15, 2024 · 2 comments · Fixed by #751
Assignees
Labels
bug Something isn't working sentry this issue has a linked sentry report

Comments

@MelissaAutumn
Copy link
Member

Sentry bug: https://thunderbird.sentry.io/issues/6031913346/?project=4505428124827648&query=is%3Aunresolved%20issue.priority%3A%5Bhigh%2C%20medium%5D&referrer=issue-stream&statsPeriod=14d&stream_index=2

On https://github.com/thunderbird/appointment/blob/main/backend/src/appointment/controller/calendar.py#L403 we assume the calendar event has a summary, in some cases it doesn't! It seems like only start and end are required fields, so we should treat everything else as optional.

@MelissaAutumn MelissaAutumn added the bug Something isn't working label Nov 15, 2024
@devmount devmount self-assigned this Nov 18, 2024
@devmount
Copy link
Collaborator

I'll look into this. I found the following spec:

eventprop  = *(
            ;
            ; The following are REQUIRED,
            ; but MUST NOT occur more than once.
            ;
            dtstamp / uid /
            ;
            ; The following is REQUIRED if the component
            ; appears in an iCalendar object that doesn't
            ; specify the ["METHOD"](https://icalendar.org/iCalendar-RFC-5545/3-7-2-method.html) property; otherwise, it
            ; is OPTIONAL; in any case, it MUST NOT occur
            ; more than once.
            ;
            dtstart /
            ;
            ; The following are OPTIONAL,
            ; but MUST NOT occur more than once.
            ;
            class / created / description / geo /
            last-mod / location / organizer / priority /
            seq / status / summary / transp /
            url / recurid /
            ;
            ; The following is OPTIONAL,
            ; but SHOULD NOT occur more than once.
            ;
            rrule /
            ;
            ; Either 'dtend' or 'duration' MAY appear in
            ; a 'eventprop', but 'dtend' and 'duration'
            ; MUST NOT occur in the same 'eventprop'.
            ;
            dtend / duration /
            ;
            ; The following are OPTIONAL,
            ; and MAY occur more than once.
            ;
            attach / attendee / categories / comment /
            contact / exdate / rstatus / related /
            resources / rdate / x-prop / iana-prop
            ;
            )

So we might indeed handle everything as optional except for dtstart.

@MelissaAutumn
Copy link
Member Author

I think we can ignore events that don't have a dtend/duration. Unless there's some existing behaviour that's expected for end-users.

@MelissaAutumn MelissaAutumn added the sentry this issue has a linked sentry report label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sentry this issue has a linked sentry report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants