aspnetcore/src
James Newton-King b53179267a Merged PR 6773: Fix routing policy exit destination
**Description**

An infinite loop can happen in routing if there is a catch all route with host name matching.

This problem is caused by the DFA matcher builder giving an incorrect exit destination to policies. Currently the exit destination is the catch all state, so the policy will transition to itself when there is no match. It will run again, transition to itself again, run again, etc. This causes the policy to run forever.

What should happen is the host name policy fails, it transitions to the final state with no candidates, and the route matcher does not match any endpoints. The browser is returned a 404 status.

**Customer Impact**

This problem shows up in this situation:
1. If a customer has configured a catch all route in their app
2. The catch all route has host matching
3. A browser makes a request to the server that matches the catch all route but doesn't match the host name

The route matcher will run forever, using up a threadpool thread. When threadpool threads are exhausted the server will stop responding.

**Regression?**

No.

**Risk**

Medium. The fix is simple but route matching is complex, and routing runs with every request.
2020-04-02 20:30:18 +00:00
..
Analyzers
Antiforgery
Azure
Components Include third-party-notices.txt in all packages (#20166) 2020-03-27 10:15:32 -07:00
DataProtection
DefaultBuilder
Features/JsonPatch
Framework Always generate checksums as last part of publish job (#20367) 2020-04-01 16:25:37 -07:00
Hosting
Html/Abstractions
Http Merged PR 6773: Fix routing policy exit destination 2020-04-02 20:30:18 +00:00
Identity Include third-party-notices.txt in all packages (#20166) 2020-03-27 10:15:32 -07:00
Installers Always generate checksums as last part of publish job (#20367) 2020-04-01 16:25:37 -07:00
Middleware
MusicStore
Mvc
ProjectTemplates
Razor
Security
Servers Backport ANCM environment variable additions (#20006) 2020-03-27 10:56:49 -07:00
Shared
SignalR
SiteExtensions
Tools
submodules