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

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Net;
using System.Net.Http;
@@ -50,8 +49,7 @@ namespace Umbraco.Web.Trees
/// <param name="queryStrings"></param>
/// <param name="use">Tree use.</param>
/// <returns></returns>
[HttpQueryStringFilter("queryStrings")]
public async Task<TreeRootNode> GetApplicationTrees(string application, string tree, FormDataCollection queryStrings, TreeUse use = TreeUse.Main)
public async Task<TreeRootNode> GetApplicationTrees(string application, string tree, [System.Web.Http.ModelBinding.ModelBinder(typeof(HttpQueryStringModelBinder))]FormDataCollection queryStrings, TreeUse use = TreeUse.Main)
{
application = application.CleanForXss();