Go to file
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
.azure/pipelines Nit: update azdo job name for macOS (#20330) 2020-04-01 16:32:19 -07:00
.config
.github
.vscode
docs Mark AspNetCore projects that aren't packaged explicitly (#18767) 2020-02-13 15:51:27 -08:00
eng Always generate checksums as last part of publish job (#20367) 2020-04-01 16:25:37 -07:00
src Merged PR 6773: Fix routing policy exit destination 2020-04-02 20:30:18 +00:00
.editorconfig
.gitattributes
.gitignore
.gitmodules
CONTRIBUTING.md
Directory.Build.props Always generate checksums as last part of publish job (#20367) 2020-04-01 16:25:37 -07:00
Directory.Build.targets Include third-party-notices.txt in all packages (#20166) 2020-03-27 10:15:32 -07:00
LICENSE.txt
NuGet.config Update dependencies from https://github.com/dotnet/efcore build 20200331.5 (#20399) 2020-04-01 07:16:57 +00:00
README.md
SECURITY.md
THIRD-PARTY-NOTICES.txt
activate.ps1
activate.sh
build.cmd
build.ps1
build.sh
clean.cmd
clean.ps1
clean.sh
dockerbuild.sh
global.json Update branding to 3.1.4 (#20110) 2020-03-25 09:16:36 -07:00
restore.cmd
restore.sh
startvs.cmd

README.md

ASP.NET Core

ASP.NET Core is an open-source and cross-platform framework for building modern cloud based internet connected applications, such as web apps, IoT apps and mobile backends. ASP.NET Core apps can run on .NET Core or on the full .NET Framework. It was architected to provide an optimized development framework for apps that are deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac and Linux. Learn more about ASP.NET Core.

Get Started

Follow the Getting Started instructions in the ASP.NET Core docs.

Also check out the .NET Homepage for released versions of .NET, getting started guides, and learning resources.

How to Engage, Contribute, and Give Feedback

Some of the best ways to contribute are to try things out, file issues, join in design conversations, and make pull-requests.

Reporting security issues and bugs

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

These are some other repos for related projects:

Code of conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.