Skip to content

[main] Update dependencies from dotnet/efcore dotnet/runtime #40507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Mar 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d00c153
Update dependencies from https://github.com/dotnet/efcore build 20220…
dotnet-maestro[bot] Mar 2, 2022
7454494
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 3, 2022
f91d767
Update dependencies from https://github.com/dotnet/efcore build 20220…
dotnet-maestro[bot] Mar 3, 2022
a365ed4
Update dependencies from https://github.com/dotnet/efcore build 20220…
dotnet-maestro[bot] Mar 4, 2022
e33403f
Update dependencies from https://github.com/dotnet/efcore build 20220…
dotnet-maestro[bot] Mar 4, 2022
1d7923f
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 4, 2022
10fb458
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 5, 2022
69dc684
Update dependencies from https://github.com/dotnet/efcore build 20220…
dotnet-maestro[bot] Mar 5, 2022
a0448c7
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 6, 2022
02eee83
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 7, 2022
9fbda59
Update dependencies from https://github.com/dotnet/efcore build 20220…
dotnet-maestro[bot] Mar 7, 2022
1b3ac76
Update dependencies from https://github.com/dotnet/efcore build 20220…
dotnet-maestro[bot] Mar 7, 2022
cea7694
Bump MCA and SDK dependencies
captainsafia Mar 7, 2022
145a386
Fix up new analyzer warnings
captainsafia Mar 8, 2022
5eba993
Fix up SYSLIB0039 warning
captainsafia Mar 8, 2022
071d3b1
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 8, 2022
cc5fd15
Update dependencies from https://github.com/dotnet/efcore build 20220…
dotnet-maestro[bot] Mar 8, 2022
c615d7d
Update dependencies from https://github.com/dotnet/efcore build 20220…
dotnet-maestro[bot] Mar 9, 2022
a254230
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 9, 2022
0110f21
Update dependencies from https://github.com/dotnet/efcore build 20220…
dotnet-maestro[bot] Mar 9, 2022
414b60b
Update dependencies from https://github.com/dotnet/efcore build 20220…
dotnet-maestro[bot] Mar 10, 2022
18ecfc8
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 10, 2022
e812f17
Update global.json
wtgodbe Mar 10, 2022
86a486d
Fix up SYSLIB0039, SYSLIB0040 warnings
TanayParikh Mar 10, 2022
1076cb3
Quarantine https://github.com/dotnet/aspnetcore/issues/40642
TanayParikh Mar 11, 2022
274c161
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 11, 2022
6797b68
Update dependencies from https://github.com/dotnet/runtime build 2022…
dotnet-maestro[bot] Mar 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
272 changes: 136 additions & 136 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

142 changes: 71 additions & 71 deletions eng/Versions.props

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"sdk": {
"version": "7.0.100-preview.2.22114.1"
"version": "7.0.100-preview.3.22159.27"
},
"tools": {
"dotnet": "7.0.100-preview.2.22114.1",
"dotnet": "7.0.100-preview.3.22159.27",
"runtimes": {
"dotnet": [
"2.1.30",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ private static void DetectMisplacedLambdaAttribute(

// () => Hello() has a single child which is a BlockOperation so we check to see if
// expression associated with that operation is an invocation expression
if (lambda.Children.FirstOrDefault().Syntax is InvocationExpressionSyntax innerInvocation)
if (lambda.ChildOperations.FirstOrDefault().Syntax is InvocationExpressionSyntax innerInvocation)
{
targetInvocation = innerInvocation;
}

if (lambda.Children.FirstOrDefault().Children.FirstOrDefault() is IReturnOperation returnOperation
if (lambda.ChildOperations.FirstOrDefault().ChildOperations.FirstOrDefault() is IReturnOperation returnOperation
&& returnOperation.ReturnedValue is IInvocationOperation returnedInvocation)
{
targetInvocation = (InvocationExpressionSyntax)returnedInvocation.Syntax;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public async Task Endpoint_PassesThrough()
[InlineData("", @"./SubFolder", "", false)]
[InlineData("", @"./SubFolder", "/你好", false)]
[InlineData("", @"./SubFolder", "/你好/世界", false)]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/40642")]
public async Task FoundDirectoryWithDefaultFile_PathModified_All(string baseUrl, string baseDir, string requestUrl, bool appendTrailingSlash = true)
{
await FoundDirectoryWithDefaultFile_PathModified(baseUrl, baseDir, requestUrl, appendTrailingSlash);
Expand All @@ -153,6 +154,7 @@ public async Task FoundDirectoryWithDefaultFile_PathModified_All(string baseUrl,
[InlineData("", @".\subFolder", "", false)]
[InlineData("", @".\SubFolder", "/你好", false)]
[InlineData("", @".\SubFolder", "/你好/世界", false)]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/40642")]
public async Task FoundDirectoryWithDefaultFile_PathModified_Windows(string baseUrl, string baseDir, string requestUrl, bool appendTrailingSlash = true)
{
await FoundDirectoryWithDefaultFile_PathModified(baseUrl, baseDir, requestUrl, appendTrailingSlash);
Expand Down Expand Up @@ -188,6 +190,7 @@ private async Task FoundDirectoryWithDefaultFile_PathModified(string baseUrl, st
[InlineData("", @"./", "/SubFolder", "?a=b")]
[InlineData("", @"./SubFolder", "/你好", "?a=b")]
[InlineData("", @"./SubFolder", "/你好/世界", "?a=b")]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/40642")]
public async Task NearMatch_RedirectAddSlash_All(string baseUrl, string baseDir, string requestUrl, string queryString)
{
await NearMatch_RedirectAddSlash(baseUrl, baseDir, requestUrl, queryString);
Expand All @@ -200,6 +203,7 @@ public async Task NearMatch_RedirectAddSlash_All(string baseUrl, string baseDir,
[InlineData("", @".\", "/SubFolder", "?a=b")]
[InlineData("", @".\SubFolder", "/你好", "?a=b")]
[InlineData("", @".\SubFolder", "/你好/世界", "?a=b")]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/40642")]
public async Task NearMatch_RedirectAddSlash_Windows(string baseUrl, string baseDir, string requestUrl, string queryString)
{
await NearMatch_RedirectAddSlash(baseUrl, baseDir, requestUrl, queryString);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ public async Task DeployTestAndAddToSpec(ServerType server, bool ssl, string env
// Win7 HttpClient on NetCoreApp2.2 defaults to TLS 1.0 and won't connect to Kestrel. https://github.com/dotnet/corefx/issues/28733
// Mac HttpClient on NetCoreApp2.0 doesn't alow you to set some combinations.
// https://github.com/dotnet/corefx/blob/586cffcdfdf23ad6c193a4bf37fce88a1bf69508/src/System.Net.Http/src/System/Net/Http/CurlHandler/CurlHandler.SslProvider.OSX.cs#L104-L106
#pragma warning disable SYSLIB0039 // TLS 1.0 and 1.1 are obsolete
handler.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls;
#pragma warning restore SYSLIB0039
handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
var client = result.CreateHttpClient(handler);

Expand Down
4 changes: 3 additions & 1 deletion src/Servers/HttpSys/src/RequestProcessing/Request.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ private void GetTlsHandshakeResults()
{
Protocol |= SslProtocols.Ssl3;
}
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning restore CS0618 // Type or Prmember is obsolete
#pragma warning disable SYSLIB0039 // TLS 1.0 and 1.1 are obsolete
if ((Protocol & SslProtocols.Tls) != 0)
{
Protocol |= SslProtocols.Tls;
Expand All @@ -307,6 +308,7 @@ private void GetTlsHandshakeResults()
{
Protocol |= SslProtocols.Tls11;
}
#pragma warning restore SYSLIB0039
if ((Protocol & SslProtocols.Tls12) != 0)
{
Protocol |= SslProtocols.Tls12;
Expand Down
8 changes: 8 additions & 0 deletions src/Servers/Kestrel/Core/test/SniOptionsSelectorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,9 @@ public void PrefersSslProtocolsDefinedInSniConfig()
"www.example.org",
new SniConfig
{
#pragma warning disable SYSLIB0039 // TLS 1.0 and 1.1 are obsolete
SslProtocols = SslProtocols.Tls13 | SslProtocols.Tls11,
#pragma warning restore SYSLIB0039
Certificate = new CertificateConfig()
}
}
Expand All @@ -550,7 +552,9 @@ public void PrefersSslProtocolsDefinedInSniConfig()
logger: Mock.Of<ILogger<HttpsConnectionMiddleware>>());

var (options, _) = sniOptionsSelector.GetOptions(new MockConnectionContext(), "www.example.org");
#pragma warning disable SYSLIB0039 // TLS 1.0 and 1.1 are obsolete
Assert.Equal(SslProtocols.Tls13 | SslProtocols.Tls11, options.EnabledSslProtocols);
#pragma warning restore SYSLIB0039
}

[Fact]
Expand Down Expand Up @@ -690,9 +694,13 @@ public void CloneSslOptionsClonesAllProperties()
// Defaults to false
ClientCertificateRequired = true,
// Defaults to SslProtocols.None
#pragma warning disable SYSLIB0039 // TLS 1.0 and 1.1 are obsolete
EnabledSslProtocols = SslProtocols.Tls13 | SslProtocols.Tls11,
#pragma warning restore SYSLIB0039
#pragma warning disable SYSLIB0040 // EncryptionPolicy.NoEncryption is obsolete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also disabling SYSLIB0040 here.

// Defaults to EncryptionPolicy.RequireEncryption
EncryptionPolicy = EncryptionPolicy.NoEncryption,
#pragma warning restore SYSLIB0040
// Defaults to null
RemoteCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true,
// Defaults to null
Expand Down
84 changes: 46 additions & 38 deletions src/Servers/Kestrel/Kestrel/test/ConfigurationReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public void ReadCertificatesWhenEmptyCertificatesSection_ReturnsEmptyCollection(
{
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("Certificates", ""),
}).Build();
new KeyValuePair<string, string>("Certificates", ""),
}).Build();
var reader = new ConfigurationReader(config);
var certificates = reader.Certificates;
Assert.NotNull(certificates);
Expand All @@ -44,13 +44,13 @@ public void ReadCertificatesSection_ReturnsCollection()
{
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("Certificates:FileCert:Path", "/path/cert.pfx"),
new KeyValuePair<string, string>("Certificates:FileCert:Password", "certpassword"),
new KeyValuePair<string, string>("Certificates:StoreCert:Subject", "certsubject"),
new KeyValuePair<string, string>("Certificates:StoreCert:Store", "certstore"),
new KeyValuePair<string, string>("Certificates:StoreCert:Location", "cetlocation"),
new KeyValuePair<string, string>("Certificates:StoreCert:AllowInvalid", "true"),
}).Build();
new KeyValuePair<string, string>("Certificates:FileCert:Path", "/path/cert.pfx"),
new KeyValuePair<string, string>("Certificates:FileCert:Password", "certpassword"),
new KeyValuePair<string, string>("Certificates:StoreCert:Subject", "certsubject"),
new KeyValuePair<string, string>("Certificates:StoreCert:Store", "certstore"),
new KeyValuePair<string, string>("Certificates:StoreCert:Location", "cetlocation"),
new KeyValuePair<string, string>("Certificates:StoreCert:AllowInvalid", "true"),
}).Build();
var reader = new ConfigurationReader(config);
var certificates = reader.Certificates;
Assert.NotNull(certificates);
Expand All @@ -76,9 +76,9 @@ public void ReadCertificatesSection_IsCaseInsensitive()
{
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("Certificates:filecert:Path", "/path/cert.pfx"),
new KeyValuePair<string, string>("CERTIFICATES:FILECERT:PASSWORD", "certpassword"),
}).Build();
new KeyValuePair<string, string>("Certificates:filecert:Path", "/path/cert.pfx"),
new KeyValuePair<string, string>("CERTIFICATES:FILECERT:PASSWORD", "certpassword"),
}).Build();
var reader = new ConfigurationReader(config);
var certificates = reader.Certificates;
Assert.NotNull(certificates);
Expand Down Expand Up @@ -223,51 +223,57 @@ public void ReadEndpointWithSingleSslProtocolSet_ReturnsCorrectValue()
{
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "Tls11"),
}).Build();
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "Tls11"),
}).Build();
var reader = new ConfigurationReader(config);

var endpoint = reader.Endpoints.First();
#pragma warning disable SYSLIB0039 // TLS 1.0 and 1.1 are obsolete
Assert.Equal(SslProtocols.Tls11, endpoint.SslProtocols);
#pragma warning restore SYSLIB0039
}

[Fact]
public void ReadEndpointWithMultipleSslProtocolsSet_ReturnsCorrectValue()
{
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "Tls11"),
new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:1", "Tls12"),
}).Build();
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "Tls11"),
new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:1", "Tls12"),
}).Build();
var reader = new ConfigurationReader(config);

var endpoint = reader.Endpoints.First();
#pragma warning disable SYSLIB0039 // TLS 1.0 and 1.1 are obsolete
Assert.Equal(SslProtocols.Tls11 | SslProtocols.Tls12, endpoint.SslProtocols);
#pragma warning restore SYSLIB0039
}

[Fact]
public void ReadEndpointWithSslProtocolSet_ReadsCaseInsensitive()
{
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "TLS11"),
}).Build();
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", "TLS11"),
}).Build();
var reader = new ConfigurationReader(config);

var endpoint = reader.Endpoints.First();
#pragma warning disable SYSLIB0039 // TLS 1.0 and 1.1 are obsolete
Assert.Equal(SslProtocols.Tls11, endpoint.SslProtocols);
#pragma warning restore SYSLIB0039
}

[Fact]
public void ReadEndpointWithNoSslProtocolSettings_ReturnsNull()
{
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
}).Build();
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
}).Build();
var reader = new ConfigurationReader(config);

var endpoint = reader.Endpoints.First();
Expand All @@ -279,8 +285,8 @@ public void ReadEndpointWithEmptySniSection_ReturnsEmptyCollection()
{
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
}).Build();
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
}).Build();

var reader = new ConfigurationReader(config);

Expand All @@ -294,9 +300,9 @@ public void ReadEndpointWithEmptySniKey_Throws()
{
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
new KeyValuePair<string, string>("Endpoints:End1:Sni::Protocols", "Http1"),
}).Build();
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
new KeyValuePair<string, string>("Endpoints:End1:Sni::Protocols", "Http1"),
}).Build();

var reader = new ConfigurationReader(config);
var end1Ex = Assert.Throws<InvalidOperationException>(() => reader.Endpoints);
Expand All @@ -309,13 +315,13 @@ public void ReadEndpointWithSniConfigured_ReturnsCorrectValue()
{
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Protocols", "Http1"),
new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:SslProtocols:0", "Tls12"),
new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Certificate:Path", "/path/cert.pfx"),
new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Certificate:Password", "certpassword"),
new KeyValuePair<string, string>("Endpoints:End1:SNI:*.example.org:ClientCertificateMode", "AllowCertificate"),
}).Build();
new KeyValuePair<string, string>("Endpoints:End1:Url", "http://*:5001"),
new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Protocols", "Http1"),
new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:SslProtocols:0", "Tls12"),
new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Certificate:Path", "/path/cert.pfx"),
new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:Certificate:Password", "certpassword"),
new KeyValuePair<string, string>("Endpoints:End1:SNI:*.example.org:ClientCertificateMode", "AllowCertificate"),
}).Build();

var reader = new ConfigurationReader(config);

Expand All @@ -338,12 +344,14 @@ public void ReadEndpointDefaultsWithSingleSslProtocolSet_ReturnsCorrectValue()
{
var config = new ConfigurationBuilder().AddInMemoryCollection(new[]
{
new KeyValuePair<string, string>("EndpointDefaults:SslProtocols:0", "Tls11"),
}).Build();
new KeyValuePair<string, string>("EndpointDefaults:SslProtocols:0", "Tls11"),
}).Build();
var reader = new ConfigurationReader(config);

var endpoint = reader.EndpointDefaults;
#pragma warning disable SYSLIB0039 // TLS 1.0 and 1.1 are obsolete
Assert.Equal(SslProtocols.Tls11, endpoint.SslProtocols);
#pragma warning restore SYSLIB0039
}

[Fact]
Expand Down
Loading