Skip to content

Commit 54b1062

Browse files
authored
Merge pull request #21791 from dotnet-maestro-bot/merge/release/3.1-to-master
2 parents 9bc1255 + 91f7ff8 commit 54b1062

13 files changed

+867
-350
lines changed

eng/Baseline.Designer.props

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

eng/Baseline.xml

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -4,86 +4,86 @@ This file contains a list of all the packages and their versions which were rele
44
Update this list when preparing for a new patch.
55
66
-->
7-
<Baseline Version="3.1.3">
7+
<Baseline Version="3.1.4">
88
<Package Id="AspNetCoreRuntime.3.0.x64" Version="3.0.3" />
99
<Package Id="AspNetCoreRuntime.3.0.x86" Version="3.0.3" />
10-
<Package Id="dotnet-sql-cache" Version="3.1.3" />
11-
<Package Id="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" Version="3.1.3" />
12-
<Package Id="Microsoft.AspNetCore.App.Runtime.win-x64" Version="3.1.3" />
13-
<Package Id="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.1.3" />
14-
<Package Id="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" Version="3.1.3" />
15-
<Package Id="Microsoft.AspNetCore.Authentication.Certificate" Version="3.1.3" />
16-
<Package Id="Microsoft.AspNetCore.Authentication.Facebook" Version="3.1.3" />
17-
<Package Id="Microsoft.AspNetCore.Authentication.Google" Version="3.1.3" />
18-
<Package Id="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.3" />
19-
<Package Id="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="3.1.3" />
20-
<Package Id="Microsoft.AspNetCore.Authentication.Negotiate" Version="3.1.3" />
21-
<Package Id="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.1.3" />
22-
<Package Id="Microsoft.AspNetCore.Authentication.Twitter" Version="3.1.3" />
23-
<Package Id="Microsoft.AspNetCore.Authentication.WsFederation" Version="3.1.3" />
24-
<Package Id="Microsoft.AspNetCore.Authorization" Version="3.1.3" />
25-
<Package Id="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="3.1.3" />
26-
<Package Id="Microsoft.AspNetCore.AzureAppServices.SiteExtension" Version="3.1.3" />
27-
<Package Id="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="3.1.3" />
10+
<Package Id="dotnet-sql-cache" Version="3.1.4" />
11+
<Package Id="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" Version="3.1.4" />
12+
<Package Id="Microsoft.AspNetCore.App.Runtime.win-x64" Version="3.1.4" />
13+
<Package Id="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.1.4" />
14+
<Package Id="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" Version="3.1.4" />
15+
<Package Id="Microsoft.AspNetCore.Authentication.Certificate" Version="3.1.4" />
16+
<Package Id="Microsoft.AspNetCore.Authentication.Facebook" Version="3.1.4" />
17+
<Package Id="Microsoft.AspNetCore.Authentication.Google" Version="3.1.4" />
18+
<Package Id="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.4" />
19+
<Package Id="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="3.1.4" />
20+
<Package Id="Microsoft.AspNetCore.Authentication.Negotiate" Version="3.1.4" />
21+
<Package Id="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.1.4" />
22+
<Package Id="Microsoft.AspNetCore.Authentication.Twitter" Version="3.1.4" />
23+
<Package Id="Microsoft.AspNetCore.Authentication.WsFederation" Version="3.1.4" />
24+
<Package Id="Microsoft.AspNetCore.Authorization" Version="3.1.4" />
25+
<Package Id="Microsoft.AspNetCore.AzureAppServices.HostingStartup" Version="3.1.4" />
26+
<Package Id="Microsoft.AspNetCore.AzureAppServices.SiteExtension" Version="3.1.4" />
27+
<Package Id="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="3.1.4" />
2828
<Package Id="Microsoft.AspNetCore.Blazor" Version="3.2.0-preview1.20073.1" />
2929
<Package Id="Microsoft.AspNetCore.Blazor.Build" Version="3.2.0-preview1.20073.1" />
3030
<Package Id="Microsoft.AspNetCore.Blazor.DevServer" Version="3.2.0-preview1.20073.1" />
3131
<Package Id="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.2.0-preview1.20073.1" />
3232
<Package Id="Microsoft.AspNetCore.Blazor.Server" Version="3.2.0-preview1.20073.1" />
3333
<Package Id="Microsoft.AspNetCore.Blazor.Templates" Version="3.2.0-preview1.20073.1" />
34-
<Package Id="Microsoft.AspNetCore.Components" Version="3.1.3" />
35-
<Package Id="Microsoft.AspNetCore.Components.Analyzers" Version="3.1.3" />
36-
<Package Id="Microsoft.AspNetCore.Components.Authorization" Version="3.1.3" />
37-
<Package Id="Microsoft.AspNetCore.Components.Forms" Version="3.1.3" />
38-
<Package Id="Microsoft.AspNetCore.Components.Web" Version="3.1.3" />
39-
<Package Id="Microsoft.AspNetCore.ConcurrencyLimiter" Version="3.1.3" />
40-
<Package Id="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.3" />
41-
<Package Id="Microsoft.AspNetCore.Cryptography.Internal" Version="3.1.3" />
42-
<Package Id="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="3.1.3" />
43-
<Package Id="Microsoft.AspNetCore.DataProtection" Version="3.1.3" />
44-
<Package Id="Microsoft.AspNetCore.DataProtection.Abstractions" Version="3.1.3" />
45-
<Package Id="Microsoft.AspNetCore.DataProtection.AzureKeyVault" Version="3.1.3" />
46-
<Package Id="Microsoft.AspNetCore.DataProtection.AzureStorage" Version="3.1.3" />
47-
<Package Id="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="3.1.3" />
48-
<Package Id="Microsoft.AspNetCore.DataProtection.Extensions" Version="3.1.3" />
49-
<Package Id="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.1.3" />
50-
<Package Id="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.1.3" />
51-
<Package Id="Microsoft.AspNetCore.HeaderPropagation" Version="3.1.3" />
52-
<Package Id="Microsoft.AspNetCore.Hosting.WindowsServices" Version="3.1.3" />
53-
<Package Id="Microsoft.AspNetCore.Http.Connections.Client" Version="3.1.3" />
54-
<Package Id="Microsoft.AspNetCore.Http.Connections.Common" Version="3.1.3" />
55-
<Package Id="Microsoft.AspNetCore.Http.Features" Version="3.1.3" />
56-
<Package Id="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.3" />
57-
<Package Id="Microsoft.AspNetCore.Identity.Specification.Tests" Version="3.1.3" />
58-
<Package Id="Microsoft.AspNetCore.Identity.UI" Version="3.1.3" />
59-
<Package Id="Microsoft.AspNetCore.JsonPatch" Version="3.1.3" />
60-
<Package Id="Microsoft.AspNetCore.Metadata" Version="3.1.3" />
61-
<Package Id="Microsoft.AspNetCore.MiddlewareAnalysis" Version="3.1.3" />
62-
<Package Id="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.3" />
63-
<Package Id="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.3" />
64-
<Package Id="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.3" />
65-
<Package Id="Microsoft.AspNetCore.NodeServices" Version="3.1.3" />
66-
<Package Id="Microsoft.AspNetCore.Owin" Version="3.1.3" />
67-
<Package Id="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" Version="3.1.3" />
68-
<Package Id="Microsoft.AspNetCore.SignalR.Client" Version="3.1.3" />
69-
<Package Id="Microsoft.AspNetCore.SignalR.Client.Core" Version="3.1.3" />
70-
<Package Id="Microsoft.AspNetCore.SignalR.Common" Version="3.1.3" />
71-
<Package Id="Microsoft.AspNetCore.SignalR.Protocols.Json" Version="3.1.3" />
72-
<Package Id="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.1.3" />
73-
<Package Id="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="3.1.3" />
74-
<Package Id="Microsoft.AspNetCore.SignalR.Specification.Tests" Version="3.1.3" />
75-
<Package Id="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="3.1.3" />
76-
<Package Id="Microsoft.AspNetCore.SpaServices" Version="3.1.3" />
77-
<Package Id="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.3" />
78-
<Package Id="Microsoft.AspNetCore.TestHost" Version="3.1.3" />
79-
<Package Id="Microsoft.dotnet-openapi" Version="3.1.3" />
80-
<Package Id="Microsoft.DotNet.Web.Client.ItemTemplates" Version="3.1.3" />
81-
<Package Id="Microsoft.DotNet.Web.ItemTemplates" Version="3.1.3" />
82-
<Package Id="Microsoft.DotNet.Web.ProjectTemplates.3.1" Version="3.1.3" />
83-
<Package Id="Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1" Version="3.1.3" />
84-
<Package Id="Microsoft.Extensions.ApiDescription.Client" Version="3.1.3" />
85-
<Package Id="Microsoft.Extensions.ApiDescription.Server" Version="3.1.3" />
86-
<Package Id="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="3.1.3" />
87-
<Package Id="Microsoft.Extensions.Identity.Core" Version="3.1.3" />
88-
<Package Id="Microsoft.Extensions.Identity.Stores" Version="3.1.3" />
34+
<Package Id="Microsoft.AspNetCore.Components" Version="3.1.4" />
35+
<Package Id="Microsoft.AspNetCore.Components.Analyzers" Version="3.1.4" />
36+
<Package Id="Microsoft.AspNetCore.Components.Authorization" Version="3.1.4" />
37+
<Package Id="Microsoft.AspNetCore.Components.Forms" Version="3.1.4" />
38+
<Package Id="Microsoft.AspNetCore.Components.Web" Version="3.1.4" />
39+
<Package Id="Microsoft.AspNetCore.ConcurrencyLimiter" Version="3.1.4" />
40+
<Package Id="Microsoft.AspNetCore.Connections.Abstractions" Version="3.1.4" />
41+
<Package Id="Microsoft.AspNetCore.Cryptography.Internal" Version="3.1.4" />
42+
<Package Id="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="3.1.4" />
43+
<Package Id="Microsoft.AspNetCore.DataProtection" Version="3.1.4" />
44+
<Package Id="Microsoft.AspNetCore.DataProtection.Abstractions" Version="3.1.4" />
45+
<Package Id="Microsoft.AspNetCore.DataProtection.AzureKeyVault" Version="3.1.4" />
46+
<Package Id="Microsoft.AspNetCore.DataProtection.AzureStorage" Version="3.1.4" />
47+
<Package Id="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="3.1.4" />
48+
<Package Id="Microsoft.AspNetCore.DataProtection.Extensions" Version="3.1.4" />
49+
<Package Id="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.1.4" />
50+
<Package Id="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.1.4" />
51+
<Package Id="Microsoft.AspNetCore.HeaderPropagation" Version="3.1.4" />
52+
<Package Id="Microsoft.AspNetCore.Hosting.WindowsServices" Version="3.1.4" />
53+
<Package Id="Microsoft.AspNetCore.Http.Connections.Client" Version="3.1.4" />
54+
<Package Id="Microsoft.AspNetCore.Http.Connections.Common" Version="3.1.4" />
55+
<Package Id="Microsoft.AspNetCore.Http.Features" Version="3.1.4" />
56+
<Package Id="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.4" />
57+
<Package Id="Microsoft.AspNetCore.Identity.Specification.Tests" Version="3.1.4" />
58+
<Package Id="Microsoft.AspNetCore.Identity.UI" Version="3.1.4" />
59+
<Package Id="Microsoft.AspNetCore.JsonPatch" Version="3.1.4" />
60+
<Package Id="Microsoft.AspNetCore.Metadata" Version="3.1.4" />
61+
<Package Id="Microsoft.AspNetCore.MiddlewareAnalysis" Version="3.1.4" />
62+
<Package Id="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.4" />
63+
<Package Id="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.4" />
64+
<Package Id="Microsoft.AspNetCore.Mvc.Testing" Version="3.1.4" />
65+
<Package Id="Microsoft.AspNetCore.NodeServices" Version="3.1.4" />
66+
<Package Id="Microsoft.AspNetCore.Owin" Version="3.1.4" />
67+
<Package Id="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" Version="3.1.4" />
68+
<Package Id="Microsoft.AspNetCore.SignalR.Client" Version="3.1.4" />
69+
<Package Id="Microsoft.AspNetCore.SignalR.Client.Core" Version="3.1.4" />
70+
<Package Id="Microsoft.AspNetCore.SignalR.Common" Version="3.1.4" />
71+
<Package Id="Microsoft.AspNetCore.SignalR.Protocols.Json" Version="3.1.4" />
72+
<Package Id="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" Version="3.1.4" />
73+
<Package Id="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="3.1.4" />
74+
<Package Id="Microsoft.AspNetCore.SignalR.Specification.Tests" Version="3.1.4" />
75+
<Package Id="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="3.1.4" />
76+
<Package Id="Microsoft.AspNetCore.SpaServices" Version="3.1.4" />
77+
<Package Id="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.4" />
78+
<Package Id="Microsoft.AspNetCore.TestHost" Version="3.1.4" />
79+
<Package Id="Microsoft.dotnet-openapi" Version="3.1.4" />
80+
<Package Id="Microsoft.DotNet.Web.Client.ItemTemplates" Version="3.1.4" />
81+
<Package Id="Microsoft.DotNet.Web.ItemTemplates" Version="3.1.4" />
82+
<Package Id="Microsoft.DotNet.Web.ProjectTemplates.3.1" Version="3.1.4" />
83+
<Package Id="Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1" Version="3.1.4" />
84+
<Package Id="Microsoft.Extensions.ApiDescription.Client" Version="3.1.4" />
85+
<Package Id="Microsoft.Extensions.ApiDescription.Server" Version="3.1.4" />
86+
<Package Id="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="3.1.4" />
87+
<Package Id="Microsoft.Extensions.Identity.Core" Version="3.1.4" />
88+
<Package Id="Microsoft.Extensions.Identity.Stores" Version="3.1.4" />
8989
</Baseline>

eng/targets/ResolveReferences.targets

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@
132132
This target resolves remaining Referene items to Packages, if possible. If not, they are left as Reference items fo the SDK to resolve.
133133
This executes on NuGet restore and during DesignTimeBuild. It should not run in the outer, cross-targeting build.
134134
-->
135-
<Target Name="ResolveCustomReferences" BeforeTargets="CollectPackageReferences;ResolveAssemblyReferencesDesignTime;ResolveAssemblyReferences" Condition=" '$(TargetFramework)' != '' AND '$(EnableCustomReferenceResolution)' == 'true' ">
135+
<Target Name="ResolveCustomReferences"
136+
BeforeTargets="CheckForImplicitPackageReferenceOverrides;CollectPackageReferences;ResolvePackageAssets"
137+
Condition=" '$(TargetFramework)' != '' AND '$(EnableCustomReferenceResolution)' == 'true' ">
136138
<ItemGroup>
137139
<!-- Ensure only content asset are consumed from .Sources packages -->
138140
<Reference>

src/Http/Routing/src/Matching/DfaMatcherBuilder.cs

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ public DfaMatcherBuilder(
4141
_parameterPolicyFactory = parameterPolicyFactory;
4242
_selector = selector;
4343

44+
if (AppContext.TryGetSwitch("Microsoft.AspNetCore.Routing.UseCorrectCatchAllBehavior", out var enabled))
45+
{
46+
UseCorrectCatchAllBehavior = enabled;
47+
}
48+
else
49+
{
50+
UseCorrectCatchAllBehavior = false; // default to bugged behavior
51+
}
52+
4453
var (nodeBuilderPolicies, endpointComparerPolicies, endpointSelectorPolicies) = ExtractPolicies(policies.OrderBy(p => p.Order));
4554
_endpointSelectorPolicies = endpointSelectorPolicies;
4655
_nodeBuilders = nodeBuilderPolicies;
@@ -56,13 +65,25 @@ public DfaMatcherBuilder(
5665
// Used in tests
5766
internal EndpointComparer Comparer => _comparer;
5867

68+
// Used in tests
69+
internal bool UseCorrectCatchAllBehavior { get; set; }
70+
5971
public override void AddEndpoint(RouteEndpoint endpoint)
6072
{
6173
_endpoints.Add(endpoint);
6274
}
6375

6476
public DfaNode BuildDfaTree(bool includeLabel = false)
6577
{
78+
if (!UseCorrectCatchAllBehavior)
79+
{
80+
// In 3.0 we did a global sort of the endpoints up front. This was a bug, because we actually want
81+
// do do the sort at each level of the tree based on precedence.
82+
//
83+
// _useLegacy30Behavior enables opt-out via an AppContext switch.
84+
_endpoints.Sort(_comparer);
85+
}
86+
6687
// Since we're doing a BFS we will process each 'level' of the tree in stages
6788
// this list will hold the set of items we need to process at the current
6889
// stage.
@@ -116,8 +137,13 @@ public DfaNode BuildDfaTree(bool includeLabel = false)
116137
nextWork = previousWork;
117138
}
118139

119-
// See comments on precedenceDigitComparer
120-
work.Sort(0, workCount, precedenceDigitComparer);
140+
if (UseCorrectCatchAllBehavior)
141+
{
142+
// The fix for the 3.0 sorting behavior bug.
143+
144+
// See comments on precedenceDigitComparer
145+
work.Sort(0, workCount, precedenceDigitComparer);
146+
}
121147

122148
for (var i = 0; i < workCount; i++)
123149
{
@@ -460,7 +486,10 @@ private int AddNode(
460486
candidates,
461487
endpointSelectorPolicies?.ToArray() ?? Array.Empty<IEndpointSelectorPolicy>(),
462488
JumpTableBuilder.Build(currentDefaultDestination, currentExitDestination, pathEntries),
463-
BuildPolicy(currentExitDestination, node.NodeBuilder, policyEntries));
489+
// Use the final exit destination when building the policy state.
490+
// We don't want to use either of the current destinations because they refer routing states,
491+
// and a policy state should never transition back to a routing state.
492+
BuildPolicy(exitDestination, node.NodeBuilder, policyEntries));
464493

465494
return currentStateIndex;
466495

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// This file is used by Code Analysis to maintain SuppressMessage
2+
// attributes that are applied to this project.
3+
// Project-level suppressions either have no target or are given
4+
// a specific target and scoped to a namespace, type, member, etc.
5+
6+
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage(
7+
"Build",
8+
"xUnit1013:Public method 'Quirks_CatchAllParameter' on test class 'FullFeaturedMatcherConformanceTest' should be marked as a Theory.",
9+
Justification = "This is a bug in the xUnit analyzer. This method is already marked as a theory.",
10+
Scope = "member",
11+
Target = "~M:Microsoft.AspNetCore.Routing.Matching.FullFeaturedMatcherConformanceTest.Quirks_CatchAllParameter(System.String,System.String,System.String[],System.String[])~System.Threading.Tasks.Task")]

0 commit comments

Comments
 (0)