mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-21 00:11:44 +02:00
Disable DynamicLinq to fix CVE (#1242)
* Disable DynamicLinq * Disable DynamicLinq functionality
This commit is contained in:
@@ -110,18 +110,18 @@ public class MatcherTests
|
||||
result.Should().StartWith("new JsonPartialWildcardMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch,");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LinqMatcher_GetCSharpCodeArguments_ShouldReturnCorrectArguments()
|
||||
{
|
||||
// Arrange
|
||||
var matcher = new LinqMatcher("it.Contains(\"test\"");
|
||||
//[Fact]
|
||||
//public void LinqMatcher_GetCSharpCodeArguments_ShouldReturnCorrectArguments()
|
||||
//{
|
||||
// // Arrange
|
||||
// var matcher = new LinqMatcher("it.Contains(\"test\"");
|
||||
|
||||
// Act
|
||||
var result = matcher.GetCSharpCodeArguments();
|
||||
// // Act
|
||||
// var result = matcher.GetCSharpCodeArguments();
|
||||
|
||||
// Assert
|
||||
result.Should().Be("new LinqMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, WireMock.Matchers.MatchOperator.Or, \"it.Contains(\\\"test\\\"\")");
|
||||
}
|
||||
// // Assert
|
||||
// result.Should().Be("new LinqMatcher(WireMock.Matchers.MatchBehaviour.AcceptOnMatch, WireMock.Matchers.MatchOperator.Or, \"it.Contains(\\\"test\\\"\")");
|
||||
//}
|
||||
|
||||
[Fact]
|
||||
public void RegexMatcher_GetCSharpCodeArguments_ShouldReturnCorrectArguments()
|
||||
|
||||
@@ -19,8 +19,8 @@ public class RequestMatchResultTests
|
||||
result1.AddScore(typeof(WildcardMatcher), 0.9, null);
|
||||
|
||||
var result2 = new RequestMatchResult();
|
||||
result2.AddScore(typeof(LinqMatcher), 1, null);
|
||||
result2.AddScore(typeof(LinqMatcher), 1, null);
|
||||
result2.AddScore(typeof(JsonMatcher), 1, null);
|
||||
result2.AddScore(typeof(JsonMatcher), 1, null);
|
||||
|
||||
var results = new[] { result1, result2 };
|
||||
|
||||
@@ -40,9 +40,9 @@ public class RequestMatchResultTests
|
||||
result1.AddScore(typeof(WildcardMatcher), 1, null);
|
||||
|
||||
var result2 = new RequestMatchResult();
|
||||
result2.AddScore(typeof(LinqMatcher), 1, null);
|
||||
result2.AddScore(typeof(LinqMatcher), 1, null);
|
||||
result2.AddScore(typeof(LinqMatcher), 1, null);
|
||||
result2.AddScore(typeof(JsonMatcher), 1, null);
|
||||
result2.AddScore(typeof(JsonMatcher), 1, null);
|
||||
result2.AddScore(typeof(JsonMatcher), 1, null);
|
||||
|
||||
var results = new[] { result1, result2 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user