Avoid undefined array key sharing request#59778
Merged
ChristophWurst merged 1 commit intomasterfrom Apr 22, 2026
Merged
Conversation
Contributor
Author
|
/backport to stable33 |
Contributor
Author
|
/backport to stable32 |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR hardens DAV share request handling to avoid undefined array key warnings on malformed XML, and adds per-user rate limiting for share requests.
Changes:
- Add
RateLimitingservice and enforce it in the DAV SharingPluginPOST handler. - Validate share requests (must include 1–10
set/removeelements) and reject invalid payloads withBadRequest. - Update and expand unit tests for sharing and rate limiting; remove redundant CardDAV sharing plugin test.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/dav/lib/DAV/Sharing/Plugin.php | Adds rate-limit enforcement and request validation for share POSTs. |
| apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php | Handles null XML element lists and introduces a constant for the share element QName. |
| apps/dav/lib/DAV/Security/RateLimiting.php | New rate limiting helper for share requests. |
| apps/dav/lib/Server.php | Injects RateLimiting into the sharing plugin for calendars/addressbooks. |
| apps/dav/tests/unit/DAV/Sharing/PluginTest.php | Updates plugin construction and adds tests for invalid share requests. |
| apps/dav/tests/unit/DAV/Security/RateLimitingTest.php | New unit tests for rate limiting behavior. |
| apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php | Removes an older/redundant test. |
| apps/dav/composer/composer/autoload_static.php | Adds classmap entry for the new rate limiting class. |
| apps/dav/composer/composer/autoload_classmap.php | Adds classmap entry for the new rate limiting class. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SebastianKrupinski
approved these changes
Apr 21, 2026
AI-assisted: OpenCode (gpt-5.4) Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
f766153 to
055bd5c
Compare
CarlSchwan
approved these changes
Apr 22, 2026
This was referenced Apr 22, 2026
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.
Summary
Avoid an undefined array key warning when sending a malformed share request.
I will send a follow up to integrate with config lexicon.
Checklist
3. to review, feature component)stable32)AI (if applicable)