views:

178

answers:

1

Since I decided to pass the id of a particular record via query string so I encrypted the id (id=090ed4fe-daec-452d-b025-f664dcc1164d) and attached it's value to the url.

As we all know the url encoded value for / is %2f. So, on a particular instance of the application an id value (id=090ed4fe-daec-452d-b025-f664dcc1164d), which was encrypted and then encoded returns a value:

M2vaIbPkOqO6lw4jv%2bqE2f%2fhTrK495ny92uPcLBOJBNcMpg1RUme%2fvAo6LyKfdp9e

When I hover across the a link I get:

M2vaIbPkOqO6lw4jv+qE//hTrK495ny92uPcLBOJBNcMpg1RUme/vAo6LyKfdp9e

for the "encrypted and encoded" part which is right. But when I use the Context.Request.RawUrl property to retrieve the url I get:

M2vaIbPkOqO6lw4jv+qE/hTrK495ny92uPcLBOJBNcMpg1RUme/vAo6LyKfdp9e

So the problem is that it remove one(1) '/' from the string and hence I can not decrypt the string anymore.

By the way I have had this module for months now and have never encountered this problem. It just turns out that I'm having two(2) '/'(2f%2f) adjacent to each other for the first time.

Please, is there anyway I can make Context.Request.RawUrl return the right string and stop it from striping off one(1) '/'?