cfcookie with a domain

Discussion in 'Programming' started by majorpayne27, Sep 12, 2007.

  1. #1
    Hello all,

    I'm a fairly experience Java programmer, but have absolutely no experience in ColdFusion and cookies.

    I have a ColdFusion-driven page that is setting a cookie detailing whether a user is logged in or not. That forwards to a different website that will then read that cookie in a Java program and will use the cookie to determine if the user is logged in.

    Basically, my cookie on the ColdFusion page is currently:

    <cfcookie: name="user"
    value="whatever"
    domain=".123.456.789.10">

    The page links to a java class at 123.456.789.10:2020/ABCD/class.do

    I suspect my problem is in setting the domain, but really I have no idea. Any help would be much appreciated.
     
    majorpayne27, Sep 12, 2007 IP
  2. seamus.hogan

    seamus.hogan Peon

    Messages:
    31
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    A security feature of cookies is that one domain cannot read anothers cookie. There are work arounds but I would approach it differently and probably pass the logged in status as an encrypted url variable.
     
    seamus.hogan, Sep 14, 2007 IP