note 69127 deleted from ref.session by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 17:13:19 +0000 |
| Subject: | note 69127 deleted from ref.session by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142206@lists.php.net to get a copy of this message | ||
Note Submitter: entropicchild
----
I just went looking through the /tmp dir on a shared hosting server, and noticed all the php
sessions stored there (bad idea for shared hosting). I noticed that some of these people/scripts are
storing plain-text passwords in their sessions (another very bad idea). Here's a hint people:
do not store ANYTHING that may present a security risk in the session data! This includes,
passwords, creditcard information, etc.
It is best, under ALL circumstances that a dir other than /tmp be used for session data. Btw,
whomever it was that said it was no more secure to use a diff dir was wrong. The /tmp dir is a
globally readable/writable dir.
If you are using shared hosting, then you better be sure your session data is being saved within
your home dir and NOT web-accessible. If you are a shared hosting sysadmin, you should be doing this
for your users automatically... as well as any other tmp files (file uploads, etc...).