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

fix(caldav): Ignore invalid events for reminder generation #38301

Merged
merged 2 commits into from Jun 1, 2023

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented May 16, 2023

Summary

Fixes Call to a member function serialize() on null at apps/dav/lib/CalDAV/Reminder/ReminderService.php:261 with 25.0.4.

TODO

  • Fix

Checklist

@ChristophWurst ChristophWurst added bug 2. developing Work in progress labels May 16, 2023
@ChristophWurst ChristophWurst self-assigned this May 16, 2023
@@ -267,7 +275,14 @@
if ($masterItem) {
$processedAlarms = [];
$masterAlarms = [];
$masterHash = $this->getEventHash($masterItem);
try {
$masterHash = $this->getEventHash($recurrenceException);

Check notice

Code scanning / Psalm

PossiblyUndefinedVariable

Possibly undefined variable $recurrenceException, first seen on line 246
@@ -397,7 +412,14 @@
bool $isRecurring = false,
bool $isRecurrenceException = false):array {
if ($eventHash === null) {
$eventHash = $this->getEventHash($valarm->parent);
try {
$eventHash = $this->getEventHash($valarm->parent);

Check notice

Code scanning / Psalm

ArgumentTypeCoercion

Argument 1 of OCA\DAV\CalDAV\Reminder\ReminderService::getEventHash expects Sabre\VObject\Component\VEvent, but parent type Sabre\VObject\Node provided
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst ChristophWurst changed the title fix(caldav): Catch invalid events for reminder generation fix(caldav): Ignore invalid events for reminder generation May 31, 2023
@ChristophWurst ChristophWurst force-pushed the fix/carddav/catch-invalid-event-reminder-service branch from cbe36c2 to b7e7d80 Compare May 31, 2023 07:49
@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 31, 2023
@ChristophWurst ChristophWurst marked this pull request as ready for review May 31, 2023 07:49
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst
Copy link
Member Author

/backport to stable27

@ChristophWurst
Copy link
Member Author

/backport to stable26

@ChristophWurst
Copy link
Member Author

/backport to stable25

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 31, 2023
@blizzz blizzz merged commit 63e7ac4 into master Jun 1, 2023
29 of 36 checks passed
@blizzz blizzz deleted the fix/carddav/catch-invalid-event-reminder-service branch June 1, 2023 09:37
@backportbot-nextcloud
Copy link

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

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

# Create the new backport branch
git checkout -b fix/foo-stable25

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable25

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@ChristophWurst
Copy link
Member Author

/backport to stable25

@ChristophWurst
Copy link
Member Author

the backport worked locally

@backportbot-nextcloud
Copy link

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

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

# Create the new backport branch
git checkout -b fix/foo-stable25

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable25

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug
Projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants