Carefully filter out non matching time ranges for CalDAV search#30048
Merged
ChristophWurst merged 1 commit intomasterfrom Dec 14, 2021
Merged
Carefully filter out non matching time ranges for CalDAV search#30048ChristophWurst merged 1 commit intomasterfrom
ChristophWurst merged 1 commit intomasterfrom
Conversation
Member
Author
Could you please also test and try to break this? It's some critical code :) |
c341375 to
b88c1c9
Compare
Contributor
|
Tested it, works as expected! |
b88c1c9 to
2e8cf44
Compare
Member
Author
|
/backport to stable23 |
2e8cf44 to
454f27c
Compare
This comment has been minimized.
This comment has been minimized.
454f27c to
97797a2
Compare
When we search for CalDAV objects in the DB we take the first and last occurence into account. For recurring events that is when they take place the very first time and the very last time. Searching in a more specific time range will still match this condition, because the recurring event starts before the end of the requested range but ends after the start of the requested range. Sabre has filters for this. If we apply them on all seach objects of a search with a time range, then only the recurring events actually taking place at the time of the requested time range will be returned. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
97797a2 to
b005846
Compare
Member
|
Merge? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When we search for CalDAV objects in the DB we take the first and last
occurrence into account. For recurring events that is when they take
place the very first time and the very last time. Searching in a more
specific time range will still match this condition, because the
recurring event starts before the end of the requested range but ends
after the start of the requested range.
Sabre has filters for this. If we apply them on all search objects of a
search with a time range, then only the recurring events actually taking
place at the time of the requested time range will be returned.
Fixes nextcloud/calendar#3781