Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encrypt Information Displayed in Address Bar

Status
Not open for further replies.

agoyal2

Programmer
Jul 19, 2004
6
IN
I have an ASP application which emails links to the users, which the users can click to access previously entered information by them. The link looks like


Now, my problem is, if some other user types out the above URL in the browser address bar and changes the id, he can see other user's information.

Therefore, I want to send encrypted links to users which can be decrypted in my ASP before i display information. When i tried an encryption algorithm i got something like:


Now the problem here is, i can still play with the three characters (trying different random combinations) immediately after "id" and get to others pages.
 
Why not have a Login page that sets a cookie or a session variable.

Then make a little INCLUDE file that holds the code to check for this cookie or session variable and include it on every sensitive page. If the values cannot be read, redirect the user to the Login page.
 
Thanks... I found out the solution. I was missing the use of Server.URLEncode which transformed my string to a completely secure form. :)
 
No, any user could copy that string and use it... it just would be hard to remember or guess.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top