mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-21 08:39:00 +01:00
Disable DynamicLinq to fix CVE (#1242)
* Disable DynamicLinq * Disable DynamicLinq functionality
This commit is contained in:
@@ -59,8 +59,11 @@ internal class MatcherMapper
|
||||
|
||||
throw new NotSupportedException("It's not allowed to use the 'CSharpCodeMatcher' because WireMockServerSettings.AllowCSharpCodeMatcher is not set to 'true'.");
|
||||
|
||||
case nameof(LinqMatcher):
|
||||
return new LinqMatcher(matchBehaviour, matchOperator, stringPatterns);
|
||||
case "LinqMatcher":
|
||||
throw new NotSupportedException("It's not allowed to use the 'LinqMatcher' due to CVE.");
|
||||
|
||||
//case nameof(LinqMatcher):
|
||||
// return new LinqMatcher(matchBehaviour, matchOperator, stringPatterns);
|
||||
|
||||
case nameof(ExactMatcher):
|
||||
return new ExactMatcher(matchBehaviour, ignoreCase, matchOperator, stringPatterns);
|
||||
|
||||
@@ -58,6 +58,12 @@
|
||||
<DefineConstants>$(DefineConstants);TRAILINGHEADERS</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Json\DynamicPropertyWithValue.cs" />
|
||||
<Compile Remove="Json\JObjectExtensions.cs" />
|
||||
<Compile Remove="Matchers\LinqMatcher.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JsonConverter.Abstractions" Version="0.7.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
@@ -177,7 +183,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Handlebars.Net.Helpers" Version="2.4.9" />
|
||||
<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.4.9" />
|
||||
<!--<PackageReference Include="Handlebars.Net.Helpers.DynamicLinq" Version="2.4.9" />-->
|
||||
<PackageReference Include="Handlebars.Net.Helpers.Humanizer" Version="2.4.9" />
|
||||
<PackageReference Include="Handlebars.Net.Helpers.Json" Version="2.4.9" />
|
||||
<PackageReference Include="Handlebars.Net.Helpers.Random" Version="2.4.9" />
|
||||
|
||||
Reference in New Issue
Block a user