Login redirect url loses part after #
Description of bug
The login redirect mechanism in DNN should ensure that the entire originally requested url is used when redirecting the user to log in and return. I have links using client-side routing (i.e. that include parameters after #) that do not survive this process.
Steps to reproduce
Link that was clicked on:
https://mysite.com/fr-fr/Material/moduleId/665/CompanyId/17/controller/Products/action/Index#/p/25102
Redirects to
https://mysite.com/fr-fr/Login?returnurl=%2ffr-fr%2fMaterial%2fmoduleId%2f665%2fCompanyId%2f17%2fcontroller%2fProducts%2faction%2fIndex#/p/25102
And then
http://mysite.com/fr-fr/Material/moduleId/665/CompanyId/17/controller/Products/action/Index#/
Current behavior
Note the missing p/25102 at the end of the last url.
Expected behavior
We should have the full url. I suspect we should also have the encoding of the forward slashes in the redirecturl correct. That may even be the root cause.
Affected version
- [x] 09.06.01
Affected browser
All
I looked into this a bit as well, it looks like we need to properly encode the URL hash, as the /, as is, is a valid character
For Reference: https://stackoverflow.com/questions/2849756/list-of-valid-characters-for-the-fragment-identifier-in-an-url
Right. From my research we go through HttpUtility.UrlEncode, but running this in isolation it works as expected. So we are doing something here that changes the url before the encoding or something.