diff --git a/NuGet.config b/NuGet.config index 638a9d1e79789c..10d96cfd9794d4 100644 --- a/NuGet.config +++ b/NuGet.config @@ -9,7 +9,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 82dbfd7214a6d5..d3a065fc6da91a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -12,37 +12,37 @@ https://github.com/dotnet/wcf 7f504aabb1988e9a093c1e74d8040bd52feb2f01 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 https://github.com/dotnet/command-line-api @@ -64,18 +64,18 @@ 4fe10b2349082f474928ac1b97ce207b70dc2307 - + https://github.com/dotnet/emsdk - fb1326b0f4622f04f21584dc133f1c71f7554509 + dee978139950436eec13cadd76e9a438bdb26d4b - + https://github.com/dotnet/emsdk - fb1326b0f4622f04f21584dc133f1c71f7554509 + dee978139950436eec13cadd76e9a438bdb26d4b - + https://github.com/dotnet/emsdk - fb1326b0f4622f04f21584dc133f1c71f7554509 + dee978139950436eec13cadd76e9a438bdb26d4b @@ -226,61 +226,61 @@ https://github.com/dotnet/runtime-assets 70d5fa7d7d041da17e6f3827f55d7d9ceaffdb12 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 - + https://github.com/dotnet/llvm-project - d34917598a46b95346f56f91006cf9c7f9cb27b3 + ec2b6cf0d0cacbcd527f193599b04725617897a3 https://github.com/dotnet/runtime diff --git a/eng/Versions.props b/eng/Versions.props index 5577d424fbb9a9..3f2666c454b8c3 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,11 +1,11 @@ - 9.0.14 + 9.0.15 9 0 - 14 + 15 9.0.100 8.0.$([MSBuild]::Add($(PatchVersion),11)) 7.0.20 @@ -229,26 +229,26 @@ 2.4.8 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 - 9.0.14-servicing.26110.3 - 9.0.14 + 9.0.16-servicing.26160.4 + 9.0.16 $(MicrosoftNETWorkloadEmscriptenCurrentManifest90100Version) - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 - 19.1.0-alpha.1.26104.3 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 + 19.1.0-alpha.1.26152.4 3.1.7 1.0.406601 diff --git a/src/libraries/System.Memory/tests/Base64Url/Base64UrlUnicodeAPIsUnitTests.cs b/src/libraries/System.Memory/tests/Base64Url/Base64UrlUnicodeAPIsUnitTests.cs index 0d39bc7854bc24..f90a01e9668f13 100644 --- a/src/libraries/System.Memory/tests/Base64Url/Base64UrlUnicodeAPIsUnitTests.cs +++ b/src/libraries/System.Memory/tests/Base64Url/Base64UrlUnicodeAPIsUnitTests.cs @@ -1,4 +1,4 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; @@ -196,7 +196,8 @@ public static IEnumerable EncodeToStringTests_TestData() } [Theory] - [InlineData("\u5948cz_T", 0, 0)] // scalar code-path + [InlineData("AB\u1000D", 0, 0)] // scalar code-path, non-ASCII char > 255 (https://github.com/dotnet/runtime/issues/124513) + [InlineData("\u5948cz_T", 0, 0)] // scalar code-path [InlineData("z_Ta123\u5948", 4, 3)] [InlineData("\u5948z_T-H7sqEkerqMweH1uSw==", 0, 0)] // Vector128 code-path [InlineData("z_T-H7sqEkerqMweH1uSw\u5948==", 20, 15)] diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendTo.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendTo.cs index 0b01469e574e91..5e8928818e7909 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendTo.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendTo.cs @@ -95,7 +95,7 @@ public async Task Datagram_UDP_ShouldImplicitlyBindLocalEndpoint() [Fact] [SkipOnPlatform(TestPlatforms.FreeBSD, "FreeBSD allows sendto() to broadcast")] - [ActiveIssue("https://github.com/dotnet/runtime/issues/114450", typeof(PlatformDetection), nameof(PlatformDetection.IsMacCatalyst), nameof(PlatformDetection.IsX64Process))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/114450", TestPlatforms.OSX | TestPlatforms.MacCatalyst)] public async Task Datagram_UDP_AccessDenied_Throws_DoesNotBind() { IPEndPoint invalidEndpoint = new IPEndPoint(IPAddress.Broadcast, 1234); diff --git a/src/libraries/System.Net.WebSockets/src/Resources/Strings.resx b/src/libraries/System.Net.WebSockets/src/Resources/Strings.resx index a57e81b239a92c..a6033ed9cf8313 100644 --- a/src/libraries/System.Net.WebSockets/src/Resources/Strings.resx +++ b/src/libraries/System.Net.WebSockets/src/Resources/Strings.resx @@ -117,6 +117,9 @@ The WebSocket server sent a masked frame. + + The WebSocket client sent an unmasked frame. + The WebSocket received a continuation frame from a previous final message. diff --git a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs index 8a26a4c29e2eb0..1e80e82bdde01a 100644 --- a/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs +++ b/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs @@ -1366,6 +1366,11 @@ private async ValueTask CloseWithReceiveErrorAndThrowAsync( // Consume the mask bytes ConsumeFromBuffer(4); } + else if (_isServer) + { + resultHeader = default; + return SR.net_Websockets_ServerReceivedUnmaskedFrame; + } // Do basic validation of the header switch (header.Opcode) diff --git a/src/libraries/System.Net.WebSockets/tests/WebSocketTests.cs b/src/libraries/System.Net.WebSockets/tests/WebSocketTests.cs index 73e84998a94197..41c7fe341d266d 100644 --- a/src/libraries/System.Net.WebSockets/tests/WebSocketTests.cs +++ b/src/libraries/System.Net.WebSockets/tests/WebSocketTests.cs @@ -182,6 +182,20 @@ public async Task ThrowWhenContinuationWithDifferentCompressionFlags() client.SendAsync(Memory.Empty, WebSocketMessageType.Binary, WebSocketMessageFlags.EndOfMessage, default)); } + [Fact] + public async Task ReceiveAsync_ServerUnmaskedFrame_ThrowsWebSocketException() + { + byte[] frame = { 0x81, 0x05, 0x48, 0x65, 0x6C, 0x6C, 0x6F }; + using var stream = new MemoryStream(); + stream.Write(frame, 0, frame.Length); + stream.Position = 0; + using WebSocket websocket = WebSocket.CreateFromStream(stream, new WebSocketCreationOptions { IsServer = true }); + WebSocketException exception = await Assert.ThrowsAsync(() => + websocket.ReceiveAsync(new byte[5], CancellationToken.None)); + Assert.Equal(SR.net_Websockets_ServerReceivedUnmaskedFrame, exception.Message); + Assert.Equal(WebSocketState.Aborted, websocket.State); + } + [Fact] public async Task ReceiveAsync_WhenDisposedInParallel_DoesNotGetStuck() { diff --git a/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Helper/Base64DecoderHelper.cs b/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Helper/Base64DecoderHelper.cs index 97765e340acff0..b78e89b0fe6962 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Helper/Base64DecoderHelper.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Buffers/Text/Base64Helper/Base64DecoderHelper.cs @@ -167,6 +167,11 @@ internal static unsafe OperationStatus DecodeFrom(TBase64Deco Debug.Assert(typeof(TBase64Decoder) == typeof(Base64DecoderByte) ? remaining == 4 : remaining < 8); int i0 = decoder.DecodeRemaining(srcEnd, ref decodingMap, remaining, out uint t2, out uint t3); + if (i0 < 0) + { + goto InvalidDataExit; + } + byte* destMax = destBytes + (uint)destLength; if (!decoder.IsValidPadding(t3)) diff --git a/src/tests/Common/XHarnessRunnerLibrary/GeneratedTestRunner.cs b/src/tests/Common/XHarnessRunnerLibrary/GeneratedTestRunner.cs index 1ef8476239e869..8bce452f9a87c5 100644 --- a/src/tests/Common/XHarnessRunnerLibrary/GeneratedTestRunner.cs +++ b/src/tests/Common/XHarnessRunnerLibrary/GeneratedTestRunner.cs @@ -50,14 +50,14 @@ public override Task Run(IEnumerable testAssemblies) return Task.CompletedTask; } - public override string WriteResultsToFile(XmlResultJargon xmlResultJargon) + public override Task WriteResultsToFile(XmlResultJargon xmlResultJargon) { Debug.Assert(xmlResultJargon == XmlResultJargon.xUnit); File.WriteAllText(ResultsFileName, LastTestRun.GetTestResultOutput(_assemblyName)); - return ResultsFileName; + return Task.FromResult(ResultsFileName); } - public override void WriteResultsToFile(TextWriter writer, XmlResultJargon jargon) + public override Task WriteResultsToFile(TextWriter writer, XmlResultJargon jargon) { Debug.Assert(jargon == XmlResultJargon.xUnit); string lastTestResults = LastTestRun.GetTestResultOutput(_assemblyName); @@ -71,6 +71,7 @@ public override void WriteResultsToFile(TextWriter writer, XmlResultJargon jargo { writer.WriteLine(lastTestResults); } + return Task.CompletedTask; } public override void SkipTests(IEnumerable tests)