Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > secure sessions

secure sessions
Thread Tools
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Jan 20, 2004, 06:59 PM
 
So I'm going to be starting a project which will have login sessions that allow access to a PHP front-end for an SQL database. Which type of session would be best security-wise?

As I understand it, PHP Sessions are server-side? If that's correct I think it'd be the way to go.

Other than that issue, I think I'm good. I'll be using an SSL connection throughout their session. I also plan to be very strict on what I accept for my SQL queries. Any other big security issues? I'd appreciate any suggestions.
Travis Sanderson
     
Grizzled Veteran
Join Date: Oct 2003
Status: Offline
Reply With Quote
Jan 21, 2004, 01:14 PM
 
by default PHP sessions are stored in /tmp, so the session file is accessible to anyone on the system.

I don't particularly like this, and for an application where you want the sessions secure, a better option would be to store the session in a database rather than in flat files located in /tmp.

There are also some php session config parameters you can call to change the location the sessions are store at. for example instead of the default /tmp, you could store them in /home/your_user/sessions and then if you are on a secured server where only you have access to your home dir, only you have access to the sessions (if they are outside of the www dir).

Hope that makes sense and I did not say anything incorrectly.
     
redJag  (op)
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Jan 21, 2004, 10:10 PM
 
Well I'm assuming you meant /tmp is readable by all local users, which is fine by me. It's a server, so if someone has physical access to it, it's already too late, otherwise not a big deal.
Travis Sanderson
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:52 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2