forked from science-ation/science-ation
- Fix the multiple cookie bugs if SFIABDIRECTORY=='' and the user visits
'/admin' or some other subdir first. Setting the cookie directory to '' seems to mean that PHP sets it to the current directory. We want it to be set to '/'.
This commit is contained in:
parent
bbbd32a026
commit
6d3f518648
@ -180,8 +180,13 @@ while($r=mysql_fetch_object($q))
|
|||||||
|
|
||||||
require_once("committee.inc.php");
|
require_once("committee.inc.php");
|
||||||
|
|
||||||
session_name("SFIABSESSID".ereg_replace("[^A-Za-z]","_",$config['SFIABDIRECTORY']));
|
if($config['SFIABDIRECTORY'] == '') {
|
||||||
session_set_cookie_params(0,$config['SFIABDIRECTORY']);
|
session_name("SFIABSESSID");
|
||||||
|
session_set_cookie_params(0,'/');
|
||||||
|
} else {
|
||||||
|
session_name("SFIABSESSID".ereg_replace("[^A-Za-z]","_",$config['SFIABDIRECTORY']));
|
||||||
|
session_set_cookie_params(0,$config['SFIABDIRECTORY']);
|
||||||
|
}
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
//detect the browser first, so we know what icons to use - we store this in the config array as well
|
//detect the browser first, so we know what icons to use - we store this in the config array as well
|
||||||
|
Loading…
Reference in New Issue
Block a user