Is your browser accepting cookies? Are you retrieving the cookies correctly? It sounds more like a problem with the cookie handling in code. (But maybe you're right; I don't know specifics, only what you say.)

If you're truly worried about getting the session ID from packets, then using cookies isn't going to help at all (they're passed over the wire too on every request). The only thing that will help is using a secure connection (HTTPS). Putting the session ID in the URL makes it more accessible, but as long as you expire the sessions at a reasonable time (and give the user a way to force expiration), someone gleaning IDs from browser history or something shouldn't be much of a problem.

You could in your code limit a cookie you receive to the certain IP you assigned it to, but even that isn't failsafe as caching proxy servers, for example, only have one IP for multiple users.


In reply to Re: Session Security by The Mad Hatter
in thread Session Security by powerhouse

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.