Bad value for cookie name
This commit is contained in:
parent
b093d6499b
commit
7eaf1f8e9f
@ -34,7 +34,7 @@ if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
||||
set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs');
|
||||
|
||||
// Retrieve the entity in the cookie
|
||||
$entityCookieName = "DOLENTITYID_dolibarr";
|
||||
$entityCookieName = "DOLENTITYID_".md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"]);
|
||||
if (isset($_COOKIE[$entityCookieName])) $_SESSION["dol_entity"] = $_COOKIE[$entityCookieName];
|
||||
|
||||
require('master.inc.php');
|
||||
|
||||
@ -230,7 +230,7 @@ class modMultiCompany extends DolibarrModules
|
||||
function destroy_cookie()
|
||||
{
|
||||
// Destroy entity cookie
|
||||
$entityCookieName = "DOLENTITYID_dolibarr";
|
||||
$entityCookieName = "DOLENTITYID_".md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"]);
|
||||
setcookie($entityCookieName, '', 1, "/");
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user