Re: Session IP address matching
| From: | Stas Malyshev | Date: | Sun, 26 Jan 2014 00:44:13 +0000 |
| Subject: | Re: Session IP address matching | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71574@lists.php.net to get a copy of this message | ||
Hi!
> I have client who want to distinguish session by session ID.
> They don't want to store IP in session name.
> They would like to know creation and modification time w/o
> actually reading session data for performance reasons.
That would probably require custom read/write methods.
> which is really bad thing to do. session_create_id() generate ID using
> the same code PHP generates ID which is much secure than above and
> supposed to be faster than user land script.
I agree that exposing the ID creation function is a good addition
(actually if it was available I'd probably use it in other contexts
where I need a random token, not necessarily a session ID as such).
Maybe we need even more generic function and have session reuse that
code, too.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227