Skip to content

Commit baba7ff

Browse files
authored
Bugfix - Take ufprt from form data if the request has form content type, otherwise fallback to use the query (#11845)
1 parent 18a3133 commit baba7ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Umbraco.Web.Website/Routing/UmbracoRouteValueTransformer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public override async ValueTask<RouteValueDictionary> TransformAsync(HttpContext
130130

131131
IPublishedRequest publishedRequest = await RouteRequestAsync(umbracoContext);
132132

133-
umbracoRouteValues = await _routeValuesFactory.CreateAsync(httpContext, publishedRequest);
133+
umbracoRouteValues = await _routeValuesFactory.CreateAsync(httpContext, publishedRequest);
134134

135135
// now we need to do some public access checks
136136
umbracoRouteValues = await _publicAccessRequestHandler.RewriteForPublishedContentAccessAsync(httpContext, umbracoRouteValues);
@@ -202,8 +202,8 @@ private PostedDataProxyInfo GetFormInfo(HttpContext httpContext, RouteValueDicti
202202
}
203203

204204
// if it is a POST/GET then a value must be in the request
205-
if (!httpContext.Request.Query.TryGetValue("ufprt", out StringValues encodedVal)
206-
&& (!httpContext.Request.HasFormContentType || !httpContext.Request.Form.TryGetValue("ufprt", out encodedVal)))
205+
if ((!httpContext.Request.HasFormContentType || !httpContext.Request.Form.TryGetValue("ufprt", out StringValues encodedVal))
206+
&& !httpContext.Request.Query.TryGetValue("ufprt", out encodedVal))
207207
{
208208
return null;
209209
}

0 commit comments

Comments
 (0)