Webhook log authorization and file system path checks#19177
Merged
kjac merged 4 commits intorelease/15.4from Apr 28, 2025
Merged
Webhook log authorization and file system path checks#19177kjac merged 4 commits intorelease/15.4from
kjac merged 4 commits intorelease/15.4from
Conversation
…e of the physical file system's root.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses low severity security concerns by ensuring sensitive filesystem paths are not exposed in exception messages and by enforcing proper webhook authorization in the backoffice.
- Updated the exception message in PhysicalFileSystem to prevent leaking the filesystem's resolved full path details.
- Added authorization policies to WebhookLogControllerBase and WebhookItemControllerBase to restrict webhook access to authorized users.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Umbraco.Core/IO/PhysicalFileSystem.cs | Simplified the exception message to hide sensitive path details. |
| src/Umbraco.Cms.Api.Management/Controllers/Webhook/Logs/WebhookLogControllerBase.cs | Added authorization attribute to enforce proper user permissions for accessing webhook logs. |
| src/Umbraco.Cms.Api.Management/Controllers/Webhook/Item/WebhookItemControllerBase.cs | Added authorization attribute and necessary using directive for consistent permission checks. |
Contributor
|
Look good to me 😊 |
kjac
approved these changes
Apr 28, 2025
Contributor
kjac
left a comment
There was a problem hiding this comment.
Rolled back changes to the webhooks "items" API as discussed - otherwise this is excellent 👍
AndyButland
added a commit
that referenced
this pull request
Apr 28, 2025
* Add authorization for webhooks to item and log endpoints. * Remove full path details from exception when requesting a path outside of the physical file system's root. * Added missing usings. * Revert changes to the webhook items API --------- Co-authored-by: kjac <kja@umbraco.dk>
This was referenced Sep 28, 2025
This was referenced Oct 23, 2025
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.
Prerequisites
Description
This PR handles a couple of low severity security concerns:
Testing
For the first issue, verify that the webhook logs are still displayed when logged into the backoffice with a user that has access to webhooks.
Verify that this request to the management API fails with a 403 response when signed in as a user without access to webhooks.
For the second, verify this request to the management API fails but only reveals the originally requested relative path.