Cross domain cookie question

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Mon Nov 5 16:25:48 UTC 2007


Hi all,

   I've got a program that spans two domains, specifically "domain.com" 
and "sub.domain.com". I would like to have one cookie for both domains 
so that if a user logs into one site they can remain logged in on the 
other domain.

   I understand the need to prevent different sites from being able to 
read cookies set by other domains, but as I understand it, I should be 
able to do this because the parent domain is the same. However, I have 
failed to get this to work so far.

   My cookie is simple; when the user logs in two values are set; their 
UserID number and a random number used to generate a hash to validate 
the cookie as they traverse the site/program.

   As I understand it, I should be able to use the 'domain' command to 
do this. I have tried setting:

Set-Cookie:domain=.domain.com;
Set-Cookie:domain=domain.com;
Set-Cookie:domain=*domain.com;

   But none worked.

   Could somewhat whack me with a clue stick? It'd be much appreciated!

;)

Madi
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list