Skip to content

fix(dav): tie scheduling side effects to the calendar owner - #66953

Merged
GVodyanov merged 1 commit into
masterfrom
fix/dav/scheduling-owner-side-effects
Nov 23, 2026
Merged

GVodyanov merged 1 commit into
masterfrom
fix/dav/scheduling-owner-side-effects

Conversation

@GVodyanov

Copy link
Copy Markdown
Contributor
  • Resolves: #

Summary

Some scheduling side effects didn't check whose calendar or address they belonged to.

  • Recently contacted: only writes to your own calendars record contact interactions. iTIP delivery, replies and edits in shared calendars write into someone else's calendar and recorded that calendar's sharees and attendees for the writer.
  • Invitation links on delete: purging response links on delete matched by UID only, so deleting any copy of an event (e.g. an attendee's) also removed the organizer's links. It now only matches invitations sent by the calendar owner, and only for regular calendars.
  • Invitation links on cancel: removing an attendee now revokes their response links. Before, replying through an old link added them back to the event.
  • Calendar user addresses: only verified additional emails count as the user's calendar addresses (calendar-user-address-set, iMIP sender check). In the provisioning API, editUserMultiValue() treated users editing their own account like an admin edit and stored the address as verified, looked the new address up by the old value, and accepted duplicates.

Behaviour changes

  • Unverified additional emails are no longer scheduling addresses. Addresses users add to their own account (admins included) need the verification mail; addresses an admin adds to another account are still verified directly.
  • Invitations whose organizer isn't the owner's current primary email are no longer purged on delete; they expire via CleanupInvitationTokenJob.
  • Existing Recently contacted entries are not cleaned up.

TODO

  • Manual test on a live instance

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Assisted by ClaudeCode:claude-opus-5-5

Writes into another user's calendar, such as iTIP delivery, replies
or edits in a shared calendar, recorded that calendar's sharees and
attendees as recently contacted by the writer. Only writes to the
writer's own calendars record interactions now.

Deleting an event purged invitation response links by UID alone, so
deleting any copy of an event, for example an attendee's, also
removed the organizer's links. Purges now only match invitations
sent by the calendar owner, and only for regular calendars. An
attendee's response links also stayed valid after the organizer
removed them, and replying through one added them back to the event.
Cancelling an attendee now revokes their links.

Additional email addresses counted as calendar user addresses even
before they were verified. Only verified ones count now. In the
provisioning API, editUserMultiValue() treated users editing their
own account like an admin edit and stored the new address as
verified, looked the new address up by the old value, and accepted
duplicates.

Not included: attendees removed occurrence by occurrence keep the
links of earlier occurrences, and invitations have no column linking
them to their calendar, which would make purges exact.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
@GVodyanov
GVodyanov requested review from Altahrim and salmart-dev and removed request for a team November 23, 2026 11:43
@GVodyanov GVodyanov added the 3. to review Waiting for reviews label Nov 23, 2026
@GVodyanov
GVodyanov merged commit 00b5775 into master Nov 23, 2026
174 of 180 checks passed
@GVodyanov
GVodyanov deleted the fix/dav/scheduling-owner-side-effects branch November 23, 2026 17:29
@kesselb

kesselb commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

@GVodyanov backports?

@GVodyanov

Copy link
Copy Markdown
Contributor Author

/backport to stable35

@GVodyanov

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@GVodyanov

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@GVodyanov

Copy link
Copy Markdown
Contributor Author

/backport to stable32

@GVodyanov

Copy link
Copy Markdown
Contributor Author

/backport to stable31

@backportbot

backportbot Bot commented Nov 30, 2026

Copy link
Copy Markdown

The backport to stable31 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable31
git pull origin stable31

# Create the new backport branch
git checkout -b backport/66953/stable31

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick cec98b59

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/66953/stable31

Error: Failed to check for changes with origin/stable31: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants