Uh oh!
There was an error while loading. Please reload this page.
Avoid undefined array key sharing request - #59778
Conversation
kesselb
commented
Apr 21, 2026
/backport to stable33 |
kesselb
commented
Apr 21, 2026
/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.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AI-assisted: OpenCode (gpt-5.4) Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
f766153 to
055bd5cCompareUh oh!
There was an error while loading. Please reload this page.
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)