I recently peeked into the implementation of Url.IsLocalUrl() method which is widely used and recommended as one of the measures to use to prevent redirection attacks. I was surprised to see that this method returns false if I were to provide a complete url to one of actions of my controllers in my application.
For example, if my application is hosted at http://localhost:422 and if I were to specify a valid controller and action name such as http://localhost:422/home/index, I will get false. After looking at its implementation, I understood why. But isn't the implementation incorrect to begin with?
Should I implement my own IsLocalUrl()? Or should I continue using the current one?