User753101303 posted
Hi,
Fortify doesn't have a doc which explains exactly how the rule is triggered and how to fix it?
Assuming it is detecting the use of Redirect with anything coming from a user controlled value, try something such as
https://docs.microsoft.com/en-us/dotnet/api/system.web.webpages.httpcontextextensions.redirectlocal?view=aspnet-webpages-3.2 instead. I would expect this to throw if not directing the user to the same host name or application.
The general idea is to have a safe replacement which prevents what Fortify warn against. You can then tell Fortiy this method doesn't have this particular issue and use that method instead where Forify shows this issue. Here the idea is to be 100% sure that
the user is directed to the same site rather than to a 3rd party site.
Edit: it does something such as
https://github.com/aspnet/AspNetWebStack/blob/42991b3d2537b702736463f76a10a4fcf2ea44c9/src/System.Web.WebPages/HttpContextExtensions.cs