Skip to content

Conversation

@st3iny
Copy link
Member

@st3iny st3iny commented Dec 17, 2023

Summary

This is very hacky! However, we want to allow saving events with multiple organizers. Those events are not RFC compliant, but sometimes imported from major external calendar services (e.g. Google). If the current user is not an organizer of the event we ignore the exception as no scheduling messages will be sent anyway.

I'm not very comfortable touching scheduling code so please have a good look. I can provide test ICS files if necessary.

TODO

  • Test, test and test

Checklist

@st3iny st3iny added bug 3. to review Waiting for reviews feature: dav feature: caldav Related to CalDAV internals labels Dec 17, 2023
@st3iny st3iny added this to the Nextcloud 29 milestone Dec 17, 2023
@st3iny st3iny self-assigned this Dec 17, 2023
This is very hacky! However, we want to allow saving events with multiple
organizers. Those events are not RFC compliant, but sometimes imported from major
external calendar services (e.g. Google). If the current user is not an organizer of
the event we ignore the exception as no scheduling messages will be sent anyway.

Signed-off-by: Richard Steinmetz <[email protected]>
@st3iny st3iny force-pushed the fix/dav/allow-multiple-organizers branch from a906cff to 06aba2a Compare December 17, 2023 16:46
throw $e;
}

$addresses = $this->getAddressesForPrincipal($calendarNode->getOwner());

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 1 of OCA\DAV\CalDAV\Schedule\Plugin::getAddressesForPrincipal cannot be null, possibly null value provided
Copy link
Member

@tcitworld tcitworld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic is fine to me

Copy link
Contributor

@miaulalala miaulalala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. Psalm isn't happy :)

@st3iny
Copy link
Member Author

st3iny commented Dec 19, 2023

/backport to stable28

@st3iny
Copy link
Member Author

st3iny commented Dec 19, 2023

/backport to stable27

@st3iny
Copy link
Member Author

st3iny commented Dec 19, 2023

/backport to stable26

@gohrner
Copy link

gohrner commented Jan 18, 2024

@st3iny: Regarding:

It would be cleaner to patch Sabre to validate organizers after checking if
scheduling messages are necessary. Currently, organizers are validated first and
afterwards the broker checks if messages should be scheduled. So the code will throw
even if the organizers are not relevant. This is to ensure compliance with RFCs but
a bit too strict for real world usage.

Did you file an CR for SabreDAV to adjust this and get their feedback?

@blizzz blizzz mentioned this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug feature: caldav Related to CalDAV internals feature: dav

Projects

Development

Successfully merging this pull request may close these issues.

[Bug]: "Every instance of the event must have the same organizer."

5 participants