Solved

HTTP_Referer HELP

Posted on 2003-11-24
2
843 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Smart quotes being changed on insert 9 50
Table header not displaying on Firefox and Chrome 7 139
Choose the older file FSO 6 41
SQL to update characters in table column 6 91
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 demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now