From c7ab0d316b3668205b8fef36d1db2db84debdc0d Mon Sep 17 00:00:00 2001
From: Joel Mut <62260472+sw-joelmut@users.noreply.github.com>
Date: Mon, 5 Aug 2024 12:14:21 -0300
Subject: [PATCH] [#6825] Update Microsoft.Extensions and fix CS1061 issues
(#6832)
* Update Microsoft.Extensions and fix CS1061 issues
* Fix CVE-2024-30105 security issue
---
.../Microsoft.Bot.Builder.AI.Luis.csproj | 1 +
...ot.Builder.Dialogs.Adaptive.Runtime.csproj | 8 +++----
...osoft.Bot.Builder.Dialogs.Debugging.csproj | 4 ++--
.../Microsoft.Bot.Builder.Dialogs.csproj | 1 +
.../Microsoft.Bot.Builder.csproj | 2 +-
.../Microsoft.Bot.Connector.Streaming.csproj | 2 +-
.../Microsoft.Bot.Connector.csproj | 4 ++--
.../Microsoft.Bot.Streaming.csproj | 2 +-
...ntegration.ApplicationInsights.Core.csproj | 1 +
...Bot.Builder.Integration.AspNet.Core.csproj | 5 ++--
.../CustomSteps/JavascriptAction.cs | 2 +-
.../Microsoft.Bot.Builder.TestBot.Json.csproj | 2 +-
...ot.Connector.Streaming.Tests.Client.csproj | 4 +++-
.../EndorsementsRetrieverTests.cs | 24 +++++++++----------
.../Microsoft.Bot.Connector.Tests.csproj | 2 +-
...ilder.Integration.AspNet.Core.Tests.csproj | 2 +-
...der.Integration.AspNet.WebApi.Tests.csproj | 2 +-
17 files changed, 37 insertions(+), 31 deletions(-)
diff --git a/libraries/Microsoft.Bot.Builder.AI.LUIS/Microsoft.Bot.Builder.AI.Luis.csproj b/libraries/Microsoft.Bot.Builder.AI.LUIS/Microsoft.Bot.Builder.AI.Luis.csproj
index 8a5543ec4f..d9a433eddb 100644
--- a/libraries/Microsoft.Bot.Builder.AI.LUIS/Microsoft.Bot.Builder.AI.Luis.csproj
+++ b/libraries/Microsoft.Bot.Builder.AI.LUIS/Microsoft.Bot.Builder.AI.Luis.csproj
@@ -34,6 +34,7 @@
+
diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime/Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime.csproj b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime/Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime.csproj
index 9e5afbb004..4399e04e88 100644
--- a/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime/Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime.csproj
+++ b/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime/Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime.csproj
@@ -36,10 +36,10 @@
-
-
-
-
+
+
+
+
diff --git a/libraries/Microsoft.Bot.Builder.Dialogs.Debugging/Microsoft.Bot.Builder.Dialogs.Debugging.csproj b/libraries/Microsoft.Bot.Builder.Dialogs.Debugging/Microsoft.Bot.Builder.Dialogs.Debugging.csproj
index e82e0983ba..28b21c60e0 100644
--- a/libraries/Microsoft.Bot.Builder.Dialogs.Debugging/Microsoft.Bot.Builder.Dialogs.Debugging.csproj
+++ b/libraries/Microsoft.Bot.Builder.Dialogs.Debugging/Microsoft.Bot.Builder.Dialogs.Debugging.csproj
@@ -28,8 +28,8 @@
-
-
+
+
diff --git a/libraries/Microsoft.Bot.Builder.Dialogs/Microsoft.Bot.Builder.Dialogs.csproj b/libraries/Microsoft.Bot.Builder.Dialogs/Microsoft.Bot.Builder.Dialogs.csproj
index a993a63980..f3cb9919d8 100644
--- a/libraries/Microsoft.Bot.Builder.Dialogs/Microsoft.Bot.Builder.Dialogs.csproj
+++ b/libraries/Microsoft.Bot.Builder.Dialogs/Microsoft.Bot.Builder.Dialogs.csproj
@@ -28,6 +28,7 @@
+
diff --git a/libraries/Microsoft.Bot.Builder/Microsoft.Bot.Builder.csproj b/libraries/Microsoft.Bot.Builder/Microsoft.Bot.Builder.csproj
index b2dbbccfce..eeee1d38a1 100644
--- a/libraries/Microsoft.Bot.Builder/Microsoft.Bot.Builder.csproj
+++ b/libraries/Microsoft.Bot.Builder/Microsoft.Bot.Builder.csproj
@@ -29,7 +29,7 @@
-
+
diff --git a/libraries/Microsoft.Bot.Connector.Streaming/Microsoft.Bot.Connector.Streaming.csproj b/libraries/Microsoft.Bot.Connector.Streaming/Microsoft.Bot.Connector.Streaming.csproj
index 1f7fd4b922..11e7e45e5a 100644
--- a/libraries/Microsoft.Bot.Connector.Streaming/Microsoft.Bot.Connector.Streaming.csproj
+++ b/libraries/Microsoft.Bot.Connector.Streaming/Microsoft.Bot.Connector.Streaming.csproj
@@ -28,7 +28,7 @@
-
+
diff --git a/libraries/Microsoft.Bot.Connector/Microsoft.Bot.Connector.csproj b/libraries/Microsoft.Bot.Connector/Microsoft.Bot.Connector.csproj
index 73fce6be34..d4704b266d 100644
--- a/libraries/Microsoft.Bot.Connector/Microsoft.Bot.Connector.csproj
+++ b/libraries/Microsoft.Bot.Connector/Microsoft.Bot.Connector.csproj
@@ -27,8 +27,8 @@
-
-
+
+
diff --git a/libraries/Microsoft.Bot.Streaming/Microsoft.Bot.Streaming.csproj b/libraries/Microsoft.Bot.Streaming/Microsoft.Bot.Streaming.csproj
index ef1888b9e3..ebe50dee81 100644
--- a/libraries/Microsoft.Bot.Streaming/Microsoft.Bot.Streaming.csproj
+++ b/libraries/Microsoft.Bot.Streaming/Microsoft.Bot.Streaming.csproj
@@ -27,7 +27,7 @@
-
+
diff --git a/libraries/integration/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core.csproj b/libraries/integration/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core.csproj
index 3ff46f21ee..2a888d69af 100644
--- a/libraries/integration/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core.csproj
+++ b/libraries/integration/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core/Microsoft.Bot.Builder.Integration.ApplicationInsights.Core.csproj
@@ -47,6 +47,7 @@
+
diff --git a/libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.Core/Microsoft.Bot.Builder.Integration.AspNet.Core.csproj b/libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.Core/Microsoft.Bot.Builder.Integration.AspNet.Core.csproj
index aa21c4dd51..b4e65f9931 100644
--- a/libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.Core/Microsoft.Bot.Builder.Integration.AspNet.Core.csproj
+++ b/libraries/integration/Microsoft.Bot.Builder.Integration.AspNet.Core/Microsoft.Bot.Builder.Integration.AspNet.Core.csproj
@@ -33,13 +33,14 @@
-
-
+
+
+
diff --git a/tests/Microsoft.Bot.Builder.TestBot.Json/CustomSteps/JavascriptAction.cs b/tests/Microsoft.Bot.Builder.TestBot.Json/CustomSteps/JavascriptAction.cs
index f18f9a93f0..0e6f1bdc11 100644
--- a/tests/Microsoft.Bot.Builder.TestBot.Json/CustomSteps/JavascriptAction.cs
+++ b/tests/Microsoft.Bot.Builder.TestBot.Json/CustomSteps/JavascriptAction.cs
@@ -97,7 +97,7 @@ public JavascriptAction([CallerFilePath] string sourceFilePath = "", [CallerLine
var result = engine.Execute(this.script)
.GetValue("doAction")
- .Invoke(Jint.Native.JsValue.FromObject(engine, boundOptions ?? new object()))
+ .Call(Jint.Native.JsValue.FromObject(engine, boundOptions ?? new object()))
.ToObject();
if (this.ResultProperty != null)
diff --git a/tests/Microsoft.Bot.Builder.TestBot.Json/Microsoft.Bot.Builder.TestBot.Json.csproj b/tests/Microsoft.Bot.Builder.TestBot.Json/Microsoft.Bot.Builder.TestBot.Json.csproj
index cf5423b22c..47577c7324 100644
--- a/tests/Microsoft.Bot.Builder.TestBot.Json/Microsoft.Bot.Builder.TestBot.Json.csproj
+++ b/tests/Microsoft.Bot.Builder.TestBot.Json/Microsoft.Bot.Builder.TestBot.Json.csproj
@@ -33,7 +33,7 @@
-
+
diff --git a/tests/Microsoft.Bot.Connector.Streaming.Tests.Client/Microsoft.Bot.Connector.Streaming.Tests.Client.csproj b/tests/Microsoft.Bot.Connector.Streaming.Tests.Client/Microsoft.Bot.Connector.Streaming.Tests.Client.csproj
index 360c8247d4..c64ac56c78 100644
--- a/tests/Microsoft.Bot.Connector.Streaming.Tests.Client/Microsoft.Bot.Connector.Streaming.Tests.Client.csproj
+++ b/tests/Microsoft.Bot.Connector.Streaming.Tests.Client/Microsoft.Bot.Connector.Streaming.Tests.Client.csproj
@@ -6,7 +6,9 @@
-
+
+
+
diff --git a/tests/Microsoft.Bot.Connector.Tests/Authentication/EndorsementsRetrieverTests.cs b/tests/Microsoft.Bot.Connector.Tests/Authentication/EndorsementsRetrieverTests.cs
index 0d7dc57cc4..dbf8954338 100644
--- a/tests/Microsoft.Bot.Connector.Tests/Authentication/EndorsementsRetrieverTests.cs
+++ b/tests/Microsoft.Bot.Connector.Tests/Authentication/EndorsementsRetrieverTests.cs
@@ -50,19 +50,19 @@ public GetConfigurationAsyncTests()
}
[Fact]
- public void NullAddressParameterShouldThrow()
+ public async void NullAddressParameterShouldThrow()
{
Func action = async () => await _endorsementsRetriever.GetConfigurationAsync(null, _mockDocumentRetriever.Object, CancellationToken.None);
- action.Should().Throw().And.ParamName.Should().Be("address");
+ (await action.Should().ThrowAsync()).And.ParamName.Should().Be("address");
}
[Fact]
- public void NullDocumentRetrieverParameterShouldThrow()
+ public async void NullDocumentRetrieverParameterShouldThrow()
{
Func action = async () => await _endorsementsRetriever.GetConfigurationAsync(FakeDocumentAddress, null, CancellationToken.None);
- action.Should().Throw().And.ParamName.Should().Be("retriever");
+ (await action.Should().ThrowAsync()).And.ParamName.Should().Be("retriever");
}
[Fact]
@@ -134,14 +134,14 @@ public async Task ReturnsEmptyValues_MultipleKeysWithNoEndorsements()
}
[Fact]
- public void ThrowsIfDocumentRetrieverThrows()
+ public async void ThrowsIfDocumentRetrieverThrows()
{
_mockDocumentRetriever.Setup(dr => dr.GetDocumentAsync(FakeDocumentAddress, It.IsAny()))
.ThrowsAsync(new Exception(nameof(ThrowsIfDocumentRetrieverThrows)));
Func action = async () => await _endorsementsRetriever.GetConfigurationAsync(FakeDocumentAddress, _mockDocumentRetriever.Object, CancellationToken.None);
- action.Should().Throw().And.Message.Should().Be(nameof(ThrowsIfDocumentRetrieverThrows));
+ (await action.Should().ThrowAsync()).And.Message.Should().Be(nameof(ThrowsIfDocumentRetrieverThrows));
}
}
@@ -160,26 +160,26 @@ public GetDocumentAsyncTests()
}
[Fact]
- public void NullAddressParameterShouldThrow()
+ public async void NullAddressParameterShouldThrow()
{
Func action = async () => await _endorsementsRetriever.GetDocumentAsync(null, CancellationToken.None);
- action.Should().Throw().And.ParamName.Should().Be("address");
+ (await action.Should().ThrowAsync()).And.ParamName.Should().Be("address");
}
[Fact]
- public void NonSuccessHttpStatusResponseForEndorsementsDocumentShouldThrow()
+ public async void NonSuccessHttpStatusResponseForEndorsementsDocumentShouldThrow()
{
_mockHttpMessageHandler.When(FakeDocumentAddress)
.Respond(HttpStatusCode.NotFound);
Func action = async () => await _endorsementsRetriever.GetDocumentAsync(FakeDocumentAddress, CancellationToken.None);
- action.Should().Throw();
+ await action.Should().ThrowAsync();
}
[Fact]
- public void NonSuccessHttpStatusResponseForWebKeySetDocumentShouldThrow()
+ public async void NonSuccessHttpStatusResponseForWebKeySetDocumentShouldThrow()
{
_mockHttpMessageHandler.When(FakeDocumentAddress)
.Respond(new StringContent($@"{{ ""{EndorsementsRetriever.JsonWebKeySetUri}"": ""{FakeKeysAddressUrl}"" }}"));
@@ -189,7 +189,7 @@ public void NonSuccessHttpStatusResponseForWebKeySetDocumentShouldThrow()
Func action = async () => await _endorsementsRetriever.GetDocumentAsync(FakeDocumentAddress, CancellationToken.None);
- action.Should().Throw();
+ await action.Should().ThrowAsync();
}
[Fact]
diff --git a/tests/Microsoft.Bot.Connector.Tests/Microsoft.Bot.Connector.Tests.csproj b/tests/Microsoft.Bot.Connector.Tests/Microsoft.Bot.Connector.Tests.csproj
index 68e3e07590..7bcf63560c 100644
--- a/tests/Microsoft.Bot.Connector.Tests/Microsoft.Bot.Connector.Tests.csproj
+++ b/tests/Microsoft.Bot.Connector.Tests/Microsoft.Bot.Connector.Tests.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/tests/integration/Microsoft.Bot.Builder.Integration.AspNet.Core.Tests/Microsoft.Bot.Builder.Integration.AspNet.Core.Tests.csproj b/tests/integration/Microsoft.Bot.Builder.Integration.AspNet.Core.Tests/Microsoft.Bot.Builder.Integration.AspNet.Core.Tests.csproj
index e18a6d1e4e..0059f1d212 100644
--- a/tests/integration/Microsoft.Bot.Builder.Integration.AspNet.Core.Tests/Microsoft.Bot.Builder.Integration.AspNet.Core.Tests.csproj
+++ b/tests/integration/Microsoft.Bot.Builder.Integration.AspNet.Core.Tests/Microsoft.Bot.Builder.Integration.AspNet.Core.Tests.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/tests/integration/Microsoft.Bot.Builder.Integration.AspNet.WebApi.Tests/Microsoft.Bot.Builder.Integration.AspNet.WebApi.Tests.csproj b/tests/integration/Microsoft.Bot.Builder.Integration.AspNet.WebApi.Tests/Microsoft.Bot.Builder.Integration.AspNet.WebApi.Tests.csproj
index e1eaaca72b..dc7adbe242 100644
--- a/tests/integration/Microsoft.Bot.Builder.Integration.AspNet.WebApi.Tests/Microsoft.Bot.Builder.Integration.AspNet.WebApi.Tests.csproj
+++ b/tests/integration/Microsoft.Bot.Builder.Integration.AspNet.WebApi.Tests/Microsoft.Bot.Builder.Integration.AspNet.WebApi.Tests.csproj
@@ -104,7 +104,7 @@
- 5.7.0
+ 6.12.0
4.13.1