Current location: Hot Scripts Forums » Programming Languages » PHP » session security opinion requested


session security opinion requested

Reply
  #1 (permalink)  
Old 01-13-06, 01:34 PM
rjwebgraphix rjwebgraphix is offline
Newbie Coder
 
Join Date: Sep 2004
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
session security opinion requested

I have a contact form that when the form is submitted, if it errors it passes back to the form with an &error=field on the URL. The error is looked at and displays an error message based on what is wrong.

I'm using a $_session to pass the info back to the form so it's still filled out the way they left it.

If they successfully submit the form, the thank you page will destroy the session data.

If they navigate away from the unfinished form and come back to it through link, the session is destroyed.

The only minor issue I see is if they navigate away from the errored form and don't come back to it, the session isn't destroyed. What can happen if the session isn't destroyed?

Is there a major concern with this?
Reply With Quote
  #2 (permalink)  
Old 01-13-06, 03:05 PM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
Each session is unique to the visitor and is keyed to the cookie that he is sent when the session is created. Depending on the value in - session.cookie_lifetime - the most the visitor could ever see is data from his own session anyway.

If the value in session.cookie_lifetime is zero (the default value) when the visitor closes his browser, the session is destroyed. When he comes back to your site, the session_start() will create a new session for him.

If the value in session.cookie_lifetime is not zero, if the visitor returns within that many seconds, the session_start() will resume his previous session.

Last edited by mab; 01-13-06 at 03:10 PM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FYI: Shout goes out over PHP security bugs nugensoftware PHP 0 11-01-05 11:43 PM
urgent: session timeout occurs unexpectedly in ASP.net seemagaur ASP.NET 3 10-11-05 11:10 PM
how do I manage session cookies? Jansen Windows .NET Programming 1 05-04-05 03:32 PM
Free Server Security Audit by Touch Support TSGradyR General Advertisements 0 03-30-05 11:35 PM
Free Security Audit TSGradyR General Advertisements 0 03-15-05 07:29 PM


All times are GMT -5. The time now is 06:28 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.