XH 2.0: Use named Sessions

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

XH 2.0: Use named Sessions

Post by cmb » Wed Jul 03, 2013 3:35 pm

Hello Community,

currently the core of CMSimple_XH and several plugins are using PHP sessions. As the session cookies are set by PHP for the domain root, these sessions are shared between all CMSimple_XH installations on the domain. This might lead to collisions.

A clean solution would be to use named session, which were prepared by the CMSimple_XH's core. Unfortunately these session names would not easily be available to directly requested scripts of plugins (for instance the filebrowsers' editorbrowser.php). So we have decided to postpone the introduction of named session until a solution is found regarding this problem. To not forget the issue, I have placed it on the roadmap for CMSimple_XH 2.0.

For now, extension developers should stick with the normal PHP sessions and avoid the following session related functions: session_name() and session_destroy() (besides the functionality that is deprecated in newer PHP versions or generally frowned upon, as documented in the session book). They have to take care, however, that such potential collisions do not introduce bugs or even vulnerabilities to their extensions, or at least document, that the plugin can be used only once on any given domain.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 2.0: Use named Sessions

Post by cmb » Thu Feb 23, 2017 5:30 pm

Oops, chaos! In the meantime I had suggested to introduce named sessions for XH 1.7, and that has already been accepted and implemented, so this thread is obsolete.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply