Hotmail interaction with encoded URL parameters

We have a system that sends regular emails with links, many of which contain URL-encoded parameters, such as:

href="http://www.mydomain.com/login.aspx?returnurl=http%3A%2F%2Fwww.mydomain.com%2Fview.aspx%3Fid%3D1234%26alert%3Dtrue" 

You can see that the "returnurl" parameter is encoded. However, it seems that a large number of our users (apparently hotmail) receive emails with this partially decoded parameter, for example:

 href="http://www.mydomain.com/login.aspx?returnurl=http://www.mydomain.com/view.aspx?view.aspx%3Fid%3D1234%26alert%3Dtrue" 

Why decode it like that? Why only partially decode ?? Therefore, I do not know how to deal with it. I was thinking about base-64 encoding, but that base64 strings contain characters that also need decoding ... I was thinking about double encoding, but then I won’t know if parameter decoding should be doubled or not. Can anyone help? Thanks.

+8
email url-encoding hotmail
source share
1 answer

One of the reasons this can happen is because the URL rules for coding are different before and after ? , therefore, if the decoding engine does this from the back of the decoding rules for url and apples requests until it finds the first ? then this may cause the problem you are describing ...

Not sure how to deal with this, although I understand the system that does this inappropriate decoding is out of your control. Would I try to hide ? in the reverse url somehow ...

0
source share

All Articles