-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Fix non-parameter route constraints not called with endpoint routing for 2.2 #6587
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
Conversation
src/Mvc/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointDataSource.cs
Show resolved
Hide resolved
@natemcmaster I needed to add dependency projects to Mvc.sln. Should it not have them or has no one needed to add them until now? |
More likely the second one. If people are restoring on command line and then opening VS, they may not see this. Also, they might not see these errors anymore if using the latest VS 2019 dogfood builds, which should soon have a fix for NU1105. |
Can you fill out the shiproom template and apply the servicing-consider label when its ready for shiproom to review? |
src/Mvc/src/Microsoft.AspNetCore.Mvc.Core/Internal/MvcEndpointDataSource.cs
Show resolved
Hide resolved
dd55f16
to
7801d8c
Compare
🆙 📅 |
Can you update eng/PatchConfig.props to list the packages which need to ship an update? |
@JamesNK in addition, please resolve the conflicts in the solution |
f2b96bf
to
81486bb
Compare
Addresses #6544
Description
Route constraints that do not have a matching parameter in the pattern are not run when matching a request with endpoint routing.
In the route below the
DomainMatchingConstraint
will not be run when matching a request becausedomain
is not a route parameter.Customer Impact
Requests will get matched to unexpected endpoints, e.g. the wrong MVC action. The only easy workaround to the issue is for the customer to disable endpoint routing.
Regression?
This is a regression for customers who upgrade to ASP.NET Core 2.2 and set 2.2/latest compatibility in their Startup.cs.
Risk
The fix is a small change in how endpoints are built in MVC. Risk is incorrect logic or the introduction of a runtime error.