Skip to content

Commit 6187b6e

Browse files
authored
Merge pull request #53250 from vseanreesermsft/internal-merge-7.0-2024-01-09-1133
Merging internal commits for release/7.0
2 parents fd40e09 + 0e9d775 commit 6187b6e

File tree

11 files changed

+387
-380
lines changed

11 files changed

+387
-380
lines changed

NuGet.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<clear />
55
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
66
<!-- Begin: Package sources from dotnet-efcore -->
7-
<add key="darc-int-dotnet-efcore-31662b3" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-efcore-31662b30/nuget/v3/index.json" />
7+
<add key="darc-int-dotnet-efcore-ec0d745" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-efcore-ec0d745b/nuget/v3/index.json" />
88
<!-- End: Package sources from dotnet-efcore -->
99
<!-- Begin: Package sources from dotnet-runtime -->
10-
<add key="darc-int-dotnet-runtime-808851b" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-808851b0/nuget/v3/index.json" />
10+
<add key="darc-int-dotnet-runtime-8f4568c" value="https://pkgs.dev.azure.com/dnceng/internal/_packaging/darc-int-dotnet-runtime-8f4568cd/nuget/v3/index.json" />
1111
<!-- End: Package sources from dotnet-runtime -->
1212
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
1313
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
@@ -26,10 +26,10 @@
2626
<clear />
2727
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
2828
<!-- Begin: Package sources from dotnet-efcore -->
29-
<add key="darc-int-dotnet-efcore-31662b3" value="true" />
29+
<add key="darc-int-dotnet-efcore-ec0d745" value="true" />
3030
<!-- End: Package sources from dotnet-efcore -->
3131
<!-- Begin: Package sources from dotnet-runtime -->
32-
<add key="darc-int-dotnet-runtime-808851b" value="true" />
32+
<add key="darc-int-dotnet-runtime-8f4568c" value="true" />
3333
<!-- End: Package sources from dotnet-runtime -->
3434
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
3535
</disabledPackageSources>

eng/Baseline.Designer.props

Lines changed: 217 additions & 214 deletions
Large diffs are not rendered by default.

eng/Baseline.xml

Lines changed: 104 additions & 104 deletions
Large diffs are not rendered by default.

eng/Version.Details.xml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,37 @@
99
-->
1010
<Dependencies>
1111
<ProductDependencies>
12-
<Dependency Name="dotnet-ef" Version="7.0.14">
12+
<Dependency Name="dotnet-ef" Version="7.0.15">
1313
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
14-
<Sha>31662b30f1a4497db482b3aed8ed4c4aa6de801b</Sha>
14+
<Sha>ec0d745b900c6007fc93d16fbc70ab59729e6b1e</Sha>
1515
</Dependency>
16-
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.14">
16+
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="7.0.15">
1717
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
18-
<Sha>31662b30f1a4497db482b3aed8ed4c4aa6de801b</Sha>
18+
<Sha>ec0d745b900c6007fc93d16fbc70ab59729e6b1e</Sha>
1919
</Dependency>
20-
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="7.0.14">
20+
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="7.0.15">
2121
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
22-
<Sha>31662b30f1a4497db482b3aed8ed4c4aa6de801b</Sha>
22+
<Sha>ec0d745b900c6007fc93d16fbc70ab59729e6b1e</Sha>
2323
</Dependency>
24-
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.14">
24+
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.15">
2525
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
26-
<Sha>31662b30f1a4497db482b3aed8ed4c4aa6de801b</Sha>
26+
<Sha>ec0d745b900c6007fc93d16fbc70ab59729e6b1e</Sha>
2727
</Dependency>
28-
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.14">
28+
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.15">
2929
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
30-
<Sha>31662b30f1a4497db482b3aed8ed4c4aa6de801b</Sha>
30+
<Sha>ec0d745b900c6007fc93d16fbc70ab59729e6b1e</Sha>
3131
</Dependency>
32-
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="7.0.14">
32+
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="7.0.15">
3333
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
34-
<Sha>31662b30f1a4497db482b3aed8ed4c4aa6de801b</Sha>
34+
<Sha>ec0d745b900c6007fc93d16fbc70ab59729e6b1e</Sha>
3535
</Dependency>
36-
<Dependency Name="Microsoft.EntityFrameworkCore" Version="7.0.14">
36+
<Dependency Name="Microsoft.EntityFrameworkCore" Version="7.0.15">
3737
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
38-
<Sha>31662b30f1a4497db482b3aed8ed4c4aa6de801b</Sha>
38+
<Sha>ec0d745b900c6007fc93d16fbc70ab59729e6b1e</Sha>
3939
</Dependency>
40-
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="7.0.14">
40+
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="7.0.15">
4141
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-efcore</Uri>
42-
<Sha>31662b30f1a4497db482b3aed8ed4c4aa6de801b</Sha>
42+
<Sha>ec0d745b900c6007fc93d16fbc70ab59729e6b1e</Sha>
4343
</Dependency>
4444
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0">
4545
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
@@ -177,9 +177,9 @@
177177
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
178178
<Sha>d099f075e45d2aa6007a22b71b45a08758559f80</Sha>
179179
</Dependency>
180-
<Dependency Name="Microsoft.Internal.Runtime.AspNetCore.Transport" Version="7.0.14-servicing.23519.10">
180+
<Dependency Name="Microsoft.Internal.Runtime.AspNetCore.Transport" Version="7.0.15-servicing.23572.26">
181181
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
182-
<Sha>808851b07acfa1c5c94b0d4f9fb50debedb2df70</Sha>
182+
<Sha>8f4568cdaa2f9654fd133a17cd2dcc55b5f42455</Sha>
183183
</Dependency>
184184
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-externals" Version="7.0.0-alpha.1.22505.1">
185185
<Uri>https://github.com/dotnet/source-build-externals</Uri>
@@ -262,33 +262,33 @@
262262
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
263263
<Sha>d099f075e45d2aa6007a22b71b45a08758559f80</Sha>
264264
</Dependency>
265-
<Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.14">
265+
<Dependency Name="Microsoft.NETCore.App.Ref" Version="7.0.15">
266266
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
267-
<Sha>808851b07acfa1c5c94b0d4f9fb50debedb2df70</Sha>
267+
<Sha>8f4568cdaa2f9654fd133a17cd2dcc55b5f42455</Sha>
268268
</Dependency>
269-
<Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="7.0.14">
269+
<Dependency Name="Microsoft.NET.Runtime.MonoAOTCompiler.Task" Version="7.0.15">
270270
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
271-
<Sha>808851b07acfa1c5c94b0d4f9fb50debedb2df70</Sha>
271+
<Sha>8f4568cdaa2f9654fd133a17cd2dcc55b5f42455</Sha>
272272
</Dependency>
273-
<Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="7.0.14">
273+
<Dependency Name="Microsoft.NET.Runtime.WebAssembly.Sdk" Version="7.0.15">
274274
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
275-
<Sha>808851b07acfa1c5c94b0d4f9fb50debedb2df70</Sha>
275+
<Sha>8f4568cdaa2f9654fd133a17cd2dcc55b5f42455</Sha>
276276
</Dependency>
277277
<!--
278278
Win-x64 is used here because we have picked an arbitrary runtime identifier to flow the version of the latest NETCore.App runtime.
279279
All Runtime.$rid packages should have the same version.
280280
-->
281-
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="7.0.14">
281+
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="7.0.15">
282282
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
283-
<Sha>808851b07acfa1c5c94b0d4f9fb50debedb2df70</Sha>
283+
<Sha>8f4568cdaa2f9654fd133a17cd2dcc55b5f42455</Sha>
284284
</Dependency>
285-
<Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="7.0.14">
285+
<Dependency Name="Microsoft.NETCore.App.Runtime.AOT.win-x64.Cross.browser-wasm" Version="7.0.15">
286286
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
287-
<Sha>808851b07acfa1c5c94b0d4f9fb50debedb2df70</Sha>
287+
<Sha>8f4568cdaa2f9654fd133a17cd2dcc55b5f42455</Sha>
288288
</Dependency>
289-
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="7.0.14-servicing.23519.10">
289+
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="7.0.15-servicing.23572.26">
290290
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
291-
<Sha>808851b07acfa1c5c94b0d4f9fb50debedb2df70</Sha>
291+
<Sha>8f4568cdaa2f9654fd133a17cd2dcc55b5f42455</Sha>
292292
</Dependency>
293293
<Dependency Name="Microsoft.Web.Xdt" Version="7.0.0-preview.22423.2">
294294
<Uri>https://github.com/dotnet/xdt</Uri>

eng/Versions.props

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<AspNetCoreMajorVersion>7</AspNetCoreMajorVersion>
1010
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
1111
<AspNetCorePatchVersion>16</AspNetCorePatchVersion>
12-
<ValidateBaseline>false</ValidateBaseline>
12+
<ValidateBaseline>true</ValidateBaseline>
1313
<!--
1414
When StabilizePackageVersion is set to 'true', this branch will produce stable outputs for 'Shipping' packages
1515
-->
@@ -63,12 +63,12 @@
6363
<PropertyGroup Label="Automated">
6464
<!-- Packages from dotnet/runtime -->
6565
<MicrosoftExtensionsDependencyModelVersion>7.0.0</MicrosoftExtensionsDependencyModelVersion>
66-
<MicrosoftNETCoreAppRefVersion>7.0.14</MicrosoftNETCoreAppRefVersion>
67-
<MicrosoftNETCoreAppRuntimewinx64Version>7.0.14</MicrosoftNETCoreAppRuntimewinx64Version>
68-
<MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>7.0.14</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>
69-
<MicrosoftNETRuntimeWebAssemblySdkVersion>7.0.14</MicrosoftNETRuntimeWebAssemblySdkVersion>
70-
<MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>7.0.14</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>
71-
<MicrosoftNETCoreBrowserDebugHostTransportVersion>7.0.14-servicing.23519.10</MicrosoftNETCoreBrowserDebugHostTransportVersion>
66+
<MicrosoftNETCoreAppRefVersion>7.0.15</MicrosoftNETCoreAppRefVersion>
67+
<MicrosoftNETCoreAppRuntimewinx64Version>7.0.15</MicrosoftNETCoreAppRuntimewinx64Version>
68+
<MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>7.0.15</MicrosoftNETRuntimeMonoAOTCompilerTaskVersion>
69+
<MicrosoftNETRuntimeWebAssemblySdkVersion>7.0.15</MicrosoftNETRuntimeWebAssemblySdkVersion>
70+
<MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>7.0.15</MicrosoftNETCoreAppRuntimeAOTwinx64CrossbrowserwasmVersion>
71+
<MicrosoftNETCoreBrowserDebugHostTransportVersion>7.0.15-servicing.23572.26</MicrosoftNETCoreBrowserDebugHostTransportVersion>
7272
<MicrosoftExtensionsCachingAbstractionsVersion>7.0.0</MicrosoftExtensionsCachingAbstractionsVersion>
7373
<MicrosoftExtensionsCachingMemoryVersion>7.0.0</MicrosoftExtensionsCachingMemoryVersion>
7474
<MicrosoftExtensionsConfigurationAbstractionsVersion>7.0.0</MicrosoftExtensionsConfigurationAbstractionsVersion>
@@ -103,7 +103,7 @@
103103
<MicrosoftExtensionsOptionsDataAnnotationsVersion>7.0.0</MicrosoftExtensionsOptionsDataAnnotationsVersion>
104104
<MicrosoftExtensionsOptionsVersion>7.0.1</MicrosoftExtensionsOptionsVersion>
105105
<MicrosoftExtensionsPrimitivesVersion>7.0.0</MicrosoftExtensionsPrimitivesVersion>
106-
<MicrosoftInternalRuntimeAspNetCoreTransportVersion>7.0.14-servicing.23519.10</MicrosoftInternalRuntimeAspNetCoreTransportVersion>
106+
<MicrosoftInternalRuntimeAspNetCoreTransportVersion>7.0.15-servicing.23572.26</MicrosoftInternalRuntimeAspNetCoreTransportVersion>
107107
<SystemConfigurationConfigurationManagerVersion>7.0.0</SystemConfigurationConfigurationManagerVersion>
108108
<SystemDiagnosticsDiagnosticSourceVersion>7.0.2</SystemDiagnosticsDiagnosticSourceVersion>
109109
<SystemDiagnosticsEventLogVersion>7.0.0</SystemDiagnosticsEventLogVersion>
@@ -125,14 +125,14 @@
125125
<!-- Only listed explicitly to workaround https://github.com/dotnet/cli/issues/10528 -->
126126
<MicrosoftNETCorePlatformsVersion>7.0.4</MicrosoftNETCorePlatformsVersion>
127127
<!-- Packages from dotnet/efcore -->
128-
<dotnetefVersion>7.0.14</dotnetefVersion>
129-
<MicrosoftEntityFrameworkCoreInMemoryVersion>7.0.14</MicrosoftEntityFrameworkCoreInMemoryVersion>
130-
<MicrosoftEntityFrameworkCoreRelationalVersion>7.0.14</MicrosoftEntityFrameworkCoreRelationalVersion>
131-
<MicrosoftEntityFrameworkCoreSqliteVersion>7.0.14</MicrosoftEntityFrameworkCoreSqliteVersion>
132-
<MicrosoftEntityFrameworkCoreSqlServerVersion>7.0.14</MicrosoftEntityFrameworkCoreSqlServerVersion>
133-
<MicrosoftEntityFrameworkCoreToolsVersion>7.0.14</MicrosoftEntityFrameworkCoreToolsVersion>
134-
<MicrosoftEntityFrameworkCoreVersion>7.0.14</MicrosoftEntityFrameworkCoreVersion>
135-
<MicrosoftEntityFrameworkCoreDesignVersion>7.0.14</MicrosoftEntityFrameworkCoreDesignVersion>
128+
<dotnetefVersion>7.0.15</dotnetefVersion>
129+
<MicrosoftEntityFrameworkCoreInMemoryVersion>7.0.15</MicrosoftEntityFrameworkCoreInMemoryVersion>
130+
<MicrosoftEntityFrameworkCoreRelationalVersion>7.0.15</MicrosoftEntityFrameworkCoreRelationalVersion>
131+
<MicrosoftEntityFrameworkCoreSqliteVersion>7.0.15</MicrosoftEntityFrameworkCoreSqliteVersion>
132+
<MicrosoftEntityFrameworkCoreSqlServerVersion>7.0.15</MicrosoftEntityFrameworkCoreSqlServerVersion>
133+
<MicrosoftEntityFrameworkCoreToolsVersion>7.0.15</MicrosoftEntityFrameworkCoreToolsVersion>
134+
<MicrosoftEntityFrameworkCoreVersion>7.0.15</MicrosoftEntityFrameworkCoreVersion>
135+
<MicrosoftEntityFrameworkCoreDesignVersion>7.0.15</MicrosoftEntityFrameworkCoreDesignVersion>
136136
<!-- Packages from dotnet/arcade -->
137137
<MicrosoftDotNetBuildTasksInstallersVersion>7.0.0-beta.23564.5</MicrosoftDotNetBuildTasksInstallersVersion>
138138
<MicrosoftDotNetBuildTasksTemplatingVersion>7.0.0-beta.23564.5</MicrosoftDotNetBuildTasksTemplatingVersion>
@@ -214,15 +214,15 @@
214214
<MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>1.1.2-beta1.22276.1</MicrosoftCodeAnalysisCSharpAnalyzerTestingXUnitVersion>
215215
<MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>1.1.2-beta1.22276.1</MicrosoftCodeAnalysisCSharpCodeFixTestingXUnitVersion>
216216
<MicrosoftCssParserVersion>1.0.0-20200708.1</MicrosoftCssParserVersion>
217-
<MicrosoftIdentityModelLoggingVersion>6.15.1</MicrosoftIdentityModelLoggingVersion>
218-
<MicrosoftIdentityModelProtocolsOpenIdConnectVersion>6.15.1</MicrosoftIdentityModelProtocolsOpenIdConnectVersion>
219-
<MicrosoftIdentityModelProtocolsWsFederationVersion>6.15.1</MicrosoftIdentityModelProtocolsWsFederationVersion>
217+
<MicrosoftIdentityModelLoggingVersion>6.35.0</MicrosoftIdentityModelLoggingVersion>
218+
<MicrosoftIdentityModelProtocolsOpenIdConnectVersion>6.35.0</MicrosoftIdentityModelProtocolsOpenIdConnectVersion>
219+
<MicrosoftIdentityModelProtocolsWsFederationVersion>6.35.0</MicrosoftIdentityModelProtocolsWsFederationVersion>
220220
<MicrosoftInternalAspNetCoreH2SpecAllVersion>2.2.1</MicrosoftInternalAspNetCoreH2SpecAllVersion>
221221
<MicrosoftNETCoreWindowsApiSetsVersion>1.0.1</MicrosoftNETCoreWindowsApiSetsVersion>
222222
<MicrosoftOwinSecurityCookiesVersion>3.0.1</MicrosoftOwinSecurityCookiesVersion>
223223
<MicrosoftOwinTestingVersion>3.0.1</MicrosoftOwinTestingVersion>
224224
<MicrosoftWebAdministrationVersion>11.1.0</MicrosoftWebAdministrationVersion>
225-
<SystemIdentityModelTokensJwtVersion>6.21.0</SystemIdentityModelTokensJwtVersion>
225+
<SystemIdentityModelTokensJwtVersion>6.35.0</SystemIdentityModelTokensJwtVersion>
226226
<NuGetPackagingVersion>6.2.4</NuGetPackagingVersion>
227227
<NuGetVersioningVersion>6.2.4</NuGetVersioningVersion>
228228
<NuGetFrameworksVersion>6.2.4</NuGetFrameworksVersion>

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"sdk": {
3-
"version": "7.0.114"
3+
"version": "7.0.115"
44
},
55
"tools": {
6-
"dotnet": "7.0.114",
6+
"dotnet": "7.0.115",
77
"runtimes": {
88
"dotnet/x86": [
99
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"

src/SignalR/clients/csharp/Client/test/FunctionalTests/Startup.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.IdentityModel.Tokens.Jwt;
66
using System.IO;
77
using System.Security.Claims;
8+
using System.Security.Cryptography;
89
using Microsoft.AspNetCore.Authentication.JwtBearer;
910
using Microsoft.AspNetCore.Authentication.Negotiate;
1011
using Microsoft.AspNetCore.Authorization;
@@ -21,7 +22,7 @@ namespace Microsoft.AspNetCore.SignalR.Client.FunctionalTests;
2122

2223
public class Startup
2324
{
24-
private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(Guid.NewGuid().ToByteArray());
25+
private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray()));
2526
private readonly JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler();
2627

2728
public void ConfigureServices(IServiceCollection services)

src/SignalR/clients/ts/FunctionalTests/Startup.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.IdentityModel.Tokens.Jwt;
66
using System.Reflection;
77
using System.Security.Claims;
8+
using System.Security.Cryptography;
89
using Microsoft.AspNetCore.Authentication.JwtBearer;
910
using Microsoft.AspNetCore.Http.Connections;
1011
using Microsoft.AspNetCore.Http.Features;
@@ -18,7 +19,7 @@ namespace FunctionalTests;
1819

1920
public class Startup
2021
{
21-
private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(Guid.NewGuid().ToByteArray());
22+
private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray()));
2223
private readonly JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler();
2324

2425
private int _numRedirects;

src/SignalR/common/Http.Connections/test/HttpConnectionDispatcherTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using System.Net.Http;
1414
using System.Net.WebSockets;
1515
using System.Security.Claims;
16+
using System.Security.Cryptography;
1617
using System.Security.Principal;
1718
using System.Text;
1819
using System.Threading;
@@ -2818,7 +2819,7 @@ public async Task ConnectionClosedRequestedTriggeredOnAuthExpiration()
28182819
[InlineData(HttpTransportType.WebSockets)]
28192820
public async Task AuthenticationExpirationSetOnAuthenticatedConnectionWithJWT(HttpTransportType transportType)
28202821
{
2821-
SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(Guid.NewGuid().ToByteArray());
2822+
SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray()));
28222823
JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler();
28232824

28242825
using var host = CreateHost(services =>
@@ -2980,7 +2981,7 @@ public async Task AuthenticationExpirationSetOnAuthenticatedConnectionWithCookie
29802981
[InlineData(HttpTransportType.WebSockets)]
29812982
public async Task AuthenticationExpirationUsesCorrectScheme(HttpTransportType transportType)
29822983
{
2983-
var SecurityKey = new SymmetricSecurityKey(Guid.NewGuid().ToByteArray());
2984+
var SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray()));
29842985
var JwtTokenHandler = new JwtSecurityTokenHandler();
29852986

29862987
using var host = CreateHost(services =>

src/SignalR/samples/JwtSample/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace JwtSample;
1111

1212
public class Startup
1313
{
14-
private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(RandomNumberGenerator.GetBytes(16));
14+
private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(RandomNumberGenerator.GetBytes(32));
1515
private readonly JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler();
1616

1717
public void ConfigureServices(IServiceCollection services)

src/SignalR/server/SignalR/test/Startup.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.IdentityModel.Tokens.Jwt;
66
using System.IO;
77
using System.Security.Claims;
8+
using System.Security.Cryptography;
89
using System.Threading.Tasks;
910
using Microsoft.AspNetCore.Authentication.JwtBearer;
1011
using Microsoft.AspNetCore.Authorization;
@@ -18,7 +19,7 @@ namespace Microsoft.AspNetCore.SignalR.Tests;
1819

1920
public class Startup
2021
{
21-
private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(Guid.NewGuid().ToByteArray());
22+
private readonly SymmetricSecurityKey SecurityKey = new SymmetricSecurityKey(SHA256.HashData(Guid.NewGuid().ToByteArray()));
2223
private readonly JwtSecurityTokenHandler JwtTokenHandler = new JwtSecurityTokenHandler();
2324

2425
public void ConfigureServices(IServiceCollection services)

0 commit comments

Comments
 (0)