Skip to content

Conversation

@st3iny
Copy link
Member

@st3iny st3iny commented Jun 4, 2024

Summary

Reject calendars that

  • are subscriptions
  • are not writable
  • are shared by a user
  • are deleted
  • don't support VEVENTs

Checklist

@st3iny st3iny added 2. developing Work in progress feature: caldav Related to CalDAV internals labels Jun 4, 2024
@st3iny st3iny self-assigned this Jun 4, 2024
@st3iny
Copy link
Member Author

st3iny commented Jun 5, 2024

/backport to stable29

@st3iny st3iny force-pushed the fix/caldav/strict-default-calendar-checks branch from 9db8a35 to 3d5e847 Compare June 5, 2024 07:11
@st3iny st3iny added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jun 5, 2024
@st3iny st3iny added this to the Nextcloud 30 milestone Jun 5, 2024
@st3iny st3iny added the bug label Jun 5, 2024
@st3iny st3iny marked this pull request as ready for review June 5, 2024 07:13
@st3iny st3iny force-pushed the fix/caldav/strict-default-calendar-checks branch from 3d5e847 to a0d8728 Compare June 5, 2024 07:27
@st3iny
Copy link
Member Author

st3iny commented Jun 5, 2024

I just realized that the fallback propFind method is also broken, when a task list is on top. So we have to do the same checks in our schedule plugin, too.

I'll push another commit and some tests.

$objectTree,
$this->databaseConnection,
$this->userSession->getUser()
$this->userSession->getUser(),

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 4 of OCA\DAV\DAV\CustomPropertiesBackend::__construct cannot be null, possibly null value provided
$this->server->tree,
\OC::$server->getDatabaseConnection(),
\OC::$server->getUserSession()->getUser()
\OC::$server->getUserSession()->getUser(),

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 4 of OCA\DAV\DAV\CustomPropertiesBackend::__construct cannot be null, possibly null value provided
$this->server->tree,
\OC::$server->getDatabaseConnection(),
\OC::$server->getUserSession()->getUser()
\OC::$server->getUserSession()->getUser(),

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OC\Server::getUserSession has been marked as deprecated
Reject calendars that
- are subscriptions
- are not writable
- are shared with a user
- are deleted
- don't support VEVENTs

Signed-off-by: Richard Steinmetz <[email protected]>
@st3iny st3iny force-pushed the fix/caldav/strict-default-calendar-checks branch from a635a94 to cbea787 Compare July 22, 2024 13:24
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.

LGTM

@st3iny st3iny merged commit e54d39b into master Jul 23, 2024
@st3iny st3iny deleted the fix/caldav/strict-default-calendar-checks branch July 23, 2024 06:40
@blizzz blizzz mentioned this pull request Jul 24, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: CalDAV error when trying to add a calendar event [iCalendar objects must at least have a component of type VTODO]

5 participants