Could ASP.NET MVC prevent Open Redirect security issue

Viewed 2295

I read someone asp.net mvc code as :

[HttpGet]
public ActionResult Move(string url)
{
    return Redirect(HttpUtility.UrlEnocode(url));
}

I am afraid the code above could cause the Open Redirect security problem, because the "url" is from user's input and never be filtered/protected....

So the url could be some "www.hackersite.com", that will be dangerous...

But someone told me that asp.net mvc framework could prevent the issue through the asp.net mvc framework. I am not sure how to do that ....?

1 Answers
Related