Dnn.Platform icon indicating copy to clipboard operation
Dnn.Platform copied to clipboard

Login redirect url loses part after #

Open donker opened this issue 5 years ago • 2 comments

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

donker avatar Nov 26 '20 09:11 donker

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

mitchelsellers avatar Nov 27 '20 16:11 mitchelsellers

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.

donker avatar Nov 28 '20 19:11 donker