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

Assign correct ownerKeyVersion when updating calendar event #7537

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

bedhub
Copy link
Contributor

@bedhub bedhub commented Sep 6, 2024

Before making the REST request to update a calendar event we assign some technical attributes like _id and _ownerEncSessionKey to the new/updated event. The assignment of the _ownerKeyVersion was missing wich is required if we have another version of the group key. It is suspicious that we have to do this assignement at all because before editing the event we clone the existing entity and all attributes should have been assigned to the new one already. It should probably also not the responsibility of the updateCalendarEvent function to assign these attributes. This commit just fixes this issue itself so the user does not get the error but we should review the clone and update mechanism.

fixes #7533

Test notes:

  • Execute calendar group key rotation
  • Create new event. Change the title afterwards.

Before making the REST request to update a calendar event we assign some technical attributes like _id and _ownerEncSessionKey to the new/updated event. The assignment of the _ownerKeyVersion was missing wich is required if we have another version of the group key. It is suspicious that we have to do this assignement at all because before editing the event we clone the existing entity and all attributes should have been assigned to the new one already. It should probably also not the responsibility of the updateCalendarEvent function to assign these attributes. This commit just fixes this issue itself so the user does not get the error but we should review the clone and update mechanism.

fixes #7533
@charlag charlag force-pushed the 7533-unexpected-error-when-updating-calendar-event branch from c1b3377 to a2fcb9c Compare September 9, 2024 12:53
@charlag charlag merged commit a2fcb9c into master Sep 9, 2024
1 check passed
@charlag charlag deleted the 7533-unexpected-error-when-updating-calendar-event branch September 9, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected error when updating calendar event after key rotation
2 participants