-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11155 from umbraco/v9/bugfix/10730-route-hijackin…
…g-public-access Fixes 10730 - Route hijacking with public access
- Loading branch information
Showing
6 changed files
with
76 additions
and
53 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
18 changes: 18 additions & 0 deletions
18
src/Umbraco.Web.Website/Routing/IPublicAccessRequestHandler.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Http; | ||
using Umbraco.Cms.Web.Common.Routing; | ||
|
||
namespace Umbraco.Cms.Web.Website.Routing | ||
{ | ||
public interface IPublicAccessRequestHandler | ||
{ | ||
/// <summary> | ||
/// Ensures that access to current node is permitted. | ||
/// </summary> | ||
/// <param name="httpContext"></param> | ||
/// <param name="routeValues">The current route values</param> | ||
/// <returns>Updated route values if public access changes the rendered content, else the original route values.</returns> | ||
/// <remarks>Redirecting to a different site root and/or culture will not pick the new site root nor the new culture.</remarks> | ||
Task<UmbracoRouteValues> RewriteForPublishedContentAccessAsync(HttpContext httpContext, UmbracoRouteValues routeValues); | ||
} | ||
} |
This file contains 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
This file contains 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