From 0f1a8d322c26cdeedfb2431407a70c660c5e253b Mon Sep 17 00:00:00 2001 From: sesamefly Date: Sat, 5 Dec 2020 22:44:28 +0800 Subject: [PATCH 1/2] add param null validate --- .../AbpExtraPropertiesDictionaryModelBinderProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpExtraPropertiesDictionaryModelBinderProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpExtraPropertiesDictionaryModelBinderProvider.cs index 2aadddbb8b1..590a5b89b9b 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpExtraPropertiesDictionaryModelBinderProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpExtraPropertiesDictionaryModelBinderProvider.cs @@ -23,7 +23,7 @@ public IModelBinder GetBinder(ModelBinderProviderContext context) return null; } - if (!context.Metadata.ContainerType.IsAssignableTo()) + if (context.Metadata.ContainerType == null || !context.Metadata.ContainerType.IsAssignableTo()) { return null; } From 61be1bd5200c6b1450a4aafc445fbb82a20683a7 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 7 Dec 2020 09:35:46 +0800 Subject: [PATCH 2/2] Update AbpExtraPropertiesDictionaryModelBinderProvider.cs --- .../AbpExtraPropertiesDictionaryModelBinderProvider.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpExtraPropertiesDictionaryModelBinderProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpExtraPropertiesDictionaryModelBinderProvider.cs index 590a5b89b9b..faa490acfac 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpExtraPropertiesDictionaryModelBinderProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpExtraPropertiesDictionaryModelBinderProvider.cs @@ -23,7 +23,8 @@ public IModelBinder GetBinder(ModelBinderProviderContext context) return null; } - if (context.Metadata.ContainerType == null || !context.Metadata.ContainerType.IsAssignableTo()) + if (context.Metadata.ContainerType == null || + !context.Metadata.ContainerType.IsAssignableTo()) { return null; }