PC Review


Reply
Thread Tools Rate Thread

determine origin of request

 
 
John A Grandy
Guest
Posts: n/a
 
      28th Aug 2006
How to determine if a request originated from a link click , or otherwise
( such as pasting the url the browser ).

This would seem to work ...

if (Request.Url.Host == Request.UrlReferrer.Host)
{


But what if Request.UrlReferrer == null ... ?

Any other ideas ?


 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      28th Aug 2006
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:(E-Mail Removed)...

> How to determine if a request originated from a link click , or otherwise
> ( such as pasting the url the browser ).
>
> This would seem to work ...
>
> if (Request.Url.Host == Request.UrlReferrer.Host)
> {
>
>
> But what if Request.UrlReferrer == null ... ?


Request.UrlReferrer, aka Request.ServerVariables["HTTP_REFERER"] cannot be
relied upon at all...
http://www.google.co.uk/search?hl=en...reliable&meta=

Just like the IP address, it is so easy to spoof it
(http://www.datatrendsoftware.com/spoof.html), to the extent where the best
advice I can give you is simply not to try. Think about why you *REALLY*
need to know this information, and then work around it...


 
Reply With Quote
 
John A Grandy
Guest
Posts: n/a
 
      29th Aug 2006
Hmmm ...

Ok. Well, for sites with a tracking page that writes some tracking data to
db and then redirects to the target url, what are other solutions to stop
hackers from manipulating the tracking data ?

"Mark Rae" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
> news:(E-Mail Removed)...
>
>> How to determine if a request originated from a link click , or otherwise
>> ( such as pasting the url the browser ).
>>
>> This would seem to work ...
>>
>> if (Request.Url.Host == Request.UrlReferrer.Host)
>> {
>>
>>
>> But what if Request.UrlReferrer == null ... ?

>
> Request.UrlReferrer, aka Request.ServerVariables["HTTP_REFERER"] cannot be
> relied upon at all...
> http://www.google.co.uk/search?hl=en...reliable&meta=
>
> Just like the IP address, it is so easy to spoof it
> (http://www.datatrendsoftware.com/spoof.html), to the extent where the
> best advice I can give you is simply not to try. Think about why you
> *REALLY* need to know this information, and then work around it...
>



 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      29th Aug 2006
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:(E-Mail Removed)...

> Ok. Well, for sites with a tracking page that writes some tracking data to
> db and then redirects to the target url,


LOL! All that tells them is that the target URL has come from the tracking
page! The initial request to the tracking page could have come from
anywhere - don't you get it?

> what are other solutions to stop hackers from manipulating the tracking
> data ?


None that I know of, and this is another of those occasions where I would
dearly *love* to be proven wrong...

I've seen all sorts of "smoke and mirrors" solutions involving encrypted
querystrings and God knows what - none of them works...


 
Reply With Quote
 
John A Grandy
Guest
Posts: n/a
 
      29th Aug 2006
Guess I'm not as cynical as you.

I do see a couple moves in the right direction :

1. checking Request.UrlReferrer.Host against Request.Url.Host at least
prevents against the simple hack of copy/pasting a url from a link button
into a brower.

2. hashing the track click url and tacking it onto the end as an additional
param and on link click re-constructing the hash server-side and comparing
to the link's hash would prevent against automated software that sent
endless tracking requests with small variations


"Mark Rae" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
> news:(E-Mail Removed)...
>
>> Ok. Well, for sites with a tracking page that writes some tracking data
>> to db and then redirects to the target url,

>
> LOL! All that tells them is that the target URL has come from the tracking
> page! The initial request to the tracking page could have come from
> anywhere - don't you get it?
>
>> what are other solutions to stop hackers from manipulating the tracking
>> data ?

>
> None that I know of, and this is another of those occasions where I would
> dearly *love* to be proven wrong...
>
> I've seen all sorts of "smoke and mirrors" solutions involving encrypted
> querystrings and God knows what - none of them works...
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine request URL when implementing IHttpModule Fernando Gómez Microsoft ASP .NET 0 16th Jul 2009 12:08 AM
Property to determine if a TaskItem is a request dyowee Microsoft Outlook Discussion 4 15th Jan 2009 05:16 PM
meeting request emails bounce back from mailbox user not in origin =?Utf-8?B?RWRB?= Microsoft Outlook Discussion 0 17th Jan 2006 06:47 PM
finding the country of origin of request ArunPrakash Microsoft C# .NET 0 27th Apr 2004 01:14 PM
Determine the URL of the request Douglas Macnguyen Microsoft ASP .NET 2 16th Mar 2004 01:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:55 PM.