From 696a71166cd4d4e01ab7fa7083ae8a59bbb6b6eb Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 23 May 2024 10:14:37 +0200 Subject: [PATCH] Ensure ufprt-token requests are handle in the UmbracoRouteValueTransformer (#16347) --- src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs b/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs index 4c68d3428e..05290227b3 100644 --- a/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs +++ b/src/Umbraco.Web.Website/Routing/EagerMatcherPolicy.cs @@ -9,6 +9,7 @@ using Umbraco.Cms.Core.Routing; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Web.Common.Controllers; using Umbraco.Extensions; +using HttpRequestExtensions = Umbraco.Extensions.HttpRequestExtensions; namespace Umbraco.Cms.Web.Website.Routing; @@ -71,9 +72,10 @@ internal class EagerMatcherPolicy : MatcherPolicy, IEndpointSelectorPolicy } } - // If there's only one candidate, we don't need to do anything. + // If there's only one candidate, or the request has the ufprt-token, we don't need to do anything . + // The ufprt-token is handled by the the and should not be discarded. var candidateCount = candidates.Count; - if (candidateCount < 2) + if (candidateCount < 2 || string.IsNullOrEmpty(httpContext.Request.GetUfprt()) is false) { return; }