Solved

HTTP_Referer HELP

Posted on 2003-11-24
2
846 Views
Last Modified: 2012-03-15
Hi All,
I have an Asp page test.asp for which one parameter needs to be passed for eg id=2  so to access the page in correct way the URL would be xyz.com/test.asp?id=2     Now the ID can be 2,3,4 etc ect It is generated dynamically.I dont want users to modify the ID in the address bar hence  I am checking whether request.serverVariable("HTTP_REFERER")<>""   and if it is <>"" then I am processing the page.

I am mailing the link xyz.com/test.asp?id=2 to the customer so if the users have hotmail account,yahoo account or for that matter any web based email account and the customer clicks on the above link the value returned by request.serverVariable("HTTP_REFERER") is not null (unless the customer modifies the ID in the address bar intentionally) .But if the customer has an exchange account for eg if my email lands in outlook express ot microsoft outlook  then the value returned by request.serverVariable("HTTP_REFERER") is null even thought the customer dint play with the the id in the Address bar . I dont want that to hapen .
Is there any solution to this problem Or is there any other alternative way?

Thanks for help
Ken
0
Comment
Question by:fdbtydh
2 Comments
 
LVL 1

Accepted Solution

by:
d0zerz earned 125 total points
ID: 9813128
I don't see how you're going to fix the referer problem from outlook, but I would prevent users from modifying the id with a session variable storing the id...something like this:

if strcomp(Request.QueryString("id"),session("id")) <> 0 _
 and not isNull(session("id")) then
  'error (user has modified ID)
elseif isNull(session("id")) then
  'User hasn't been assigned a sessionID yet
  '...assign an inital one
end if

I'm not sure exactly what kind of permissions you need with id, but you're going to have to come up with something to assign the session("id") initially when they come back from the email client...Probably in a similar way that you're assigning URL ids.  This could enforce that a user can only access a certain page if they have a session("id") AND it matches with the URL id.

I could probably come up with something better if I had some idea of the page "flow" and what you're trying to prevent them from doing :)
0
 

Author Comment

by:fdbtydh
ID: 9983323
I have used session variables and it worked .

Keny
http://www.houstonoptical.com 
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question