From baba7ffed9e59362c50fa9b28e286dbe38b430cb Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Wed, 12 Jan 2022 13:54:14 +0100 Subject: [PATCH] Bugfix - Take ufprt from form data if the request has form content type, otherwise fallback to use the query (#11845) --- .../Routing/UmbracoRouteValueTransformer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.Website/Routing/UmbracoRouteValueTransformer.cs b/src/Umbraco.Web.Website/Routing/UmbracoRouteValueTransformer.cs index 717a6b490a..9106c3ed09 100644 --- a/src/Umbraco.Web.Website/Routing/UmbracoRouteValueTransformer.cs +++ b/src/Umbraco.Web.Website/Routing/UmbracoRouteValueTransformer.cs @@ -130,7 +130,7 @@ namespace Umbraco.Cms.Web.Website.Routing IPublishedRequest publishedRequest = await RouteRequestAsync(umbracoContext); - umbracoRouteValues = await _routeValuesFactory.CreateAsync(httpContext, publishedRequest); + umbracoRouteValues = await _routeValuesFactory.CreateAsync(httpContext, publishedRequest); // now we need to do some public access checks umbracoRouteValues = await _publicAccessRequestHandler.RewriteForPublishedContentAccessAsync(httpContext, umbracoRouteValues); @@ -202,8 +202,8 @@ namespace Umbraco.Cms.Web.Website.Routing } // if it is a POST/GET then a value must be in the request - if (!httpContext.Request.Query.TryGetValue("ufprt", out StringValues encodedVal) - && (!httpContext.Request.HasFormContentType || !httpContext.Request.Form.TryGetValue("ufprt", out encodedVal))) + if ((!httpContext.Request.HasFormContentType || !httpContext.Request.Form.TryGetValue("ufprt", out StringValues encodedVal)) + && !httpContext.Request.Query.TryGetValue("ufprt", out encodedVal)) { return null; }