You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$10
For Premium members:
When your controllers redirect to another location based on user input (e.g. via query string), it is important to ensure that the location is not malicious and prevent open redirect attacks. The simplest way to ensure this is by examining the URL provided by the user.
iProblem
How to prevent open redirect attacks in ASP.NET Core. Solution
When your controllers redirect to another location based on user input (e.g. via a query string), it is important to ensure that the location is not malicious and prevent open redirect attacks. The simplest way to ensure this is by examining the URL provided by the user. Framework provides couple of ways to achieve this,
Create an empty project and update Startup class to configure the services and middleware for MVC.
Add a controller to illustrate LocalRedirect() and IsLocalUrl() methods,
You could browse to these paths to test the sample,
Source Code
GitHub
Pro WPF: Windows Presentation Foundation in .NET 3.0