GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 13-Jan-2003, 13:27
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

Session ids in HTTP_REFERER


I am stuck, I am reviewing (,auditing, call it whatever) the SESSION MANAGEMENT of GIDTopsites™ Members' Control Panel when I hit a snag.

Let's say the session ID is in the URL (for members having not enabled cookies), now this member clicks on an external link from the page, surely the session id appears in the HTTP_REFERER environment variable of the new website?

How can I manipulate this not to show? Or would it show at all, though I am certain it would...
  #2  
Old 13-Jan-2003, 13:31
Elmseeker's Avatar
Elmseeker Elmseeker is offline
Awaiting Email Confirmation
 
Join Date: Jan 2003
Posts: 87
Elmseeker is on a distinguished road
I don't believe a session ID from one site will carry to another site unless you are using DB session handling and both sites are accessing the same DB. The URL identifier session ID is for accessing pages on the same site only.
  #3  
Old 13-Jan-2003, 13:45
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
You seem to have misunderstood my post, I am aware they are not appended to ext. links, however, they DO appear in HTTP_REFERER env. variables of the other site. This is the issue... I don't want it to appear:

e.g.

if a member clicks on http://www.example.com (note there's no session id appended to the link of course). However, the webmaster at www.example.com scanning through his traffic analyzer WOULD note that he received a hit from, let's say: http://topsites.gidhelp.com/member_edit.php?s_id=1&s=3hr4hfy59fb835198bfcai9ku 777h ( <- session id). Possible? VERY...
  #4  
Old 13-Jan-2003, 13:54
Elmseeker's Avatar
Elmseeker Elmseeker is offline
Awaiting Email Confirmation
 
Join Date: Jan 2003
Posts: 87
Elmseeker is on a distinguished road
Hmmm...yeah misunderstood what you wanted there...Ok..hmmm...they can't be stripped when logged unless you are using PHP to do your logging. They CAN be stripped and combined with same domain/site whcih don't have them though using some judicious echo's and not a few regex functions...I am not sure of exactly how to do it off the top of my head though.
  #5  
Old 13-Jan-2003, 14:13
Garth Farley Garth Farley is offline
Invalid Email Address
 
Join Date: May 2002
Location: Ireland
Posts: 638
Garth Farley is a jewel in the roughGarth Farley is a jewel in the roughGarth Farley is a jewel in the rough
That's certainly a security problem. There is no way, as far as I know, to prevent the browser sending this ID in the Referral header. Cookies were designed not to give such info to other URLs, hence a better tool.

The only suggestion (bar using cookies too) is for every URL on your site, to point to a redirect page, which strips this from the URL and redirects as normal.

A regexp to intercept a URL (www.google.com), and instead point it to "http://www.desilva.com/redirect?url=http://www.google.com", which redirects you to Google, but also to clear the session ID in the referral bit.

Garth Farley
  #6  
Old 13-Jan-2003, 14:16
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
hmm... interesting angle

but what about that infamous possibility of 'spoofing referrers' that everyone talks about BUT no one seems to be able to explain to me?
  #7  
Old 13-Jan-2003, 14:28
Elmseeker's Avatar
Elmseeker Elmseeker is offline
Awaiting Email Confirmation
 
Join Date: Jan 2003
Posts: 87
Elmseeker is on a distinguished road
Hmmm...of course the other option is to use IP's and a database to track sessions then no need to worry about any of this at all...ie: forget about PHP's built in session handling either write your own or find a DB session handler online somewhere...with session ID's and info stored in the DB along with the IP of the person browsing there is no longer a need to send out your SID in ANY of your URL's including those that are internal to the site.
  #8  
Old 13-Jan-2003, 14:30
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
hey, THAT's an idea! IP, sessions are short term anyway, so I could check the IP, yeah!
  #9  
Old 15-Jan-2003, 05:06
Garth Farley Garth Farley is offline
Invalid Email Address
 
Join Date: May 2002
Location: Ireland
Posts: 638
Garth Farley is a jewel in the roughGarth Farley is a jewel in the roughGarth Farley is a jewel in the rough
Are IPs really that unique. I'm using a University intranet with a leased line to the net, using I think a single IP. Say I log in, wouldn't that mean that every person in the Uni can have access?
  #10  
Old 15-Jan-2003, 05:32
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
But, they would need your session id?
 
 

Recent GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stripping SESSIONS for spiders?! Elmseeker MySQL / PHP Forum 15 07-Dec-2004 16:07

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 01:00.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.