#33072 [Opn->Asn]: session_save_path bypass safe_mode restriction

From: Date: Sat, 21 May 2005 17:20:42 +0000
Subject: #33072 [Opn->Asn]: session_save_path bypass safe_mode restriction
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-79314@lists.php.net to get a copy of this message
 ID:          33072
 Updated by:  rasmus@php.net
 Reported By: andrey at ruweb dot net
-Status:      Open
+Status:      Assigned
 Bug Type:    Safe Mode/open_basedir
 PHP Version: 5.0.4, 4.3.11
-Assigned To: 
+Assigned To: rasmus
 New Comment:

Testing a fix now


Previous Comments:
------------------------------------------------------------------------

[2005-05-21 17:13:51] zxqc2 at dunc dot com dot au

session_save_path also does not perform the open_basedir check.

It does seem reasonable to allow access to the default
session.save_path set by the ISP (even if not within the allowable
open_basedir path) - which PHP does allow.

However when a script attempts to change it through
session_save_path(...) it would make sense to perform this check to
prevent access to session directories of other virtual hosts.

I am aware that similar issues have been discussed before, and also
that there are better ways to secure sessions, but I thought I'd
mention it here for the record.

------------------------------------------------------------------------

[2005-05-19 23:21:34] andrey at ruweb dot net

Description:
------------
(Sorry, I didn't found any reports about that issue. Can't believe
nobody reported this yet!)

ini_set('session.save_path','...') works great - it produces an error
when user is trying to set session.save_path to directory owned by
another user.
But why session_save_path doesn't perform safe_mode checks?

For now with session_save_path any server user can quietly substitute
session contents at any site located at the same server if he knows the
path to directory where that site's session files stored. :(



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33072&edit=1


Thread (4 messages)

« previous php.bugs (#79314) next »