Project

General

Profile

Feature #5054

Session cookie name prevents multiple login to 2 installations of chamilo

Added by Jan Derriks over 6 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
25/06/2012
Due date:
% Done:

0%

Estimated time:
0.50 h
Complexity:
Normal
SCRUM pts - complexity:
?

Description

The CH_SID cookie is used for sessions but is the same for every install.
The effect is that if you have multiple installations of chamilo on the same server, you cannot be logged into both at the same time. Suppose chamilo.org has a test1 end test2 version of chamilo1.8, then When you switch from chamilo.org/test1 to chamilo.org/test2, you will have to logon again. And vice versa.

The problem is caused by:
main_api.lib.php: session_name('ch_sid');

And can be solved by changing ch_sid into a different name for every installation of chamilo. You can choose any name fod ch_sid.

Maybe that "store sessions in database" is another solution but I don't know for sure.


Related issues

Related to Chamilo LMS - Bug #3854: Session is inherited between browser tabsNew31/08/2011

Actions
Related to Chamilo LMS - Feature #3996: Permit setting the PHP session expiry timeNew21/10/2011

Actions

History

#1

Updated by Yannick Warnier over 6 years ago

  • Target version set to 1.9.2
  • Estimated time set to 0.50 h

Hi Jans,

This is a very specific problem. I will move it to 1.9.2 because it doesn't prevent most people to use it (I would broadly estimate the users affected to 1/100,000 because they need to have accounts on two different portals and use chamilo installations as subdirectories - we recommend using subdomains).
Subdomains work fine in this situation. In order to implement a fix to this, we would have to change the set_cookie() function to set it to a particular directory. I don't remember exactly what it is.

#2

Updated by Laurent Opprecht over 6 years ago

could go on the line of

$root_path = ...;
cookie_name = '_chamilolml_' . md5($root_path);

#3

Updated by Yannick Warnier over 6 years ago

  • Tracker changed from Bug to Feature
#4

Updated by Yannick Warnier over 6 years ago

  • Target version changed from 1.9.2 to 1.9.4
#5

Updated by Julio Montoya about 6 years ago

  • Target version changed from 1.9.4 to 2.0

Moving to 1.10

#6

Updated by Yannick Warnier almost 3 years ago

  • Target version changed from 2.0 to 3.0

Also available in: Atom PDF