Jump to content

passing the whole session to new window.


kucing

Recommended Posts

Doesn't just using session_start() do this?

 

If not you could set a cookie storing the session id, grab that value and start a session based on that value however this seems superflous as this is the usual way sessions should work anyway! I guess it's a worth a try though if nothing else will work.

This method is only as insecure as using just session_start() because sessions by default use a cookie to store the session id. It is true however that if a malicious user got hold of your session id, they could steal session.

 

I recommend using session_regenerate_id() when the user logs in/out or has any change in  authorisation level. Infact, use it as often as possible. This function creates a new session id so if a hacker did get hold of your id it would be useless pretty much instantly.

 

There are some good tutorials on the internet about session security in PHP so I would suggest given them a read for a more indepth discussion about this.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.