I'm using Url.IsLocalUrl
to check if the return URL passed to my authentication action is local or not. It works fine as long as there is no fragment in the URL. That is,
/t/test-team-3/tasks/lists/15
returns true, but /t/test-team-3/tasks#/lists/15
returns false.
What's the reasoning behind this? Is there some obscure security issue that could manifest itself in the fragment, or can I safely ignore the fragment when I'm checking if the URL is local?