Fixes binding of FormDataCollection for GET requests which fixes the compatibility with the latest WebApi 5.2.7 version (cherry picked from https://github.com/umbraco/Umbraco-CMS/pull/3851), fixes a binding redirect

This commit is contained in:
Shannon
2019-02-06 17:03:23 +11:00
parent 50d1b9ddfd
commit 33bc979cfc
10 changed files with 57 additions and 61 deletions

View File

@@ -14,6 +14,7 @@ using Umbraco.Web.Models.Trees;
using Umbraco.Web.WebApi.Filters;
using System.Globalization;
using Umbraco.Core.Models.Entities;
using System.Web.Http.ModelBinding;
using Umbraco.Web.Actions;
using Umbraco.Web.Composing;
@@ -30,8 +31,7 @@ namespace Umbraco.Web.Trees
/// <param name="id"></param>
/// <param name="queryStrings"></param>
/// <returns></returns>
[HttpQueryStringFilter("queryStrings")]
public TreeNode GetTreeNode(string id, FormDataCollection queryStrings)
public TreeNode GetTreeNode(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))]FormDataCollection queryStrings)
{
int asInt;
Guid asGuid = Guid.Empty;