New: add crypt key for cookie in conf.php
This commit is contained in:
parent
46eacb1b1a
commit
1b6fda21af
@ -514,6 +514,8 @@ function write_conf_file($conffile)
|
|||||||
global $dolibarr_main_db_type,$dolibarr_main_db_character_set,$dolibarr_main_db_collation,$dolibarr_main_authentication;
|
global $dolibarr_main_db_type,$dolibarr_main_db_character_set,$dolibarr_main_db_collation,$dolibarr_main_authentication;
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
|
$key = md5(uniqid(mt_rand(),TRUE)); // Genere un hash d'un nombre aleatoire
|
||||||
|
|
||||||
$fp = fopen("$conffile", "w");
|
$fp = fopen("$conffile", "w");
|
||||||
if($fp)
|
if($fp)
|
||||||
@ -575,6 +577,9 @@ function write_conf_file($conffile)
|
|||||||
|
|
||||||
fputs($fp, '$dolibarr_main_force_https=\''.$_POST["main_force_https"].'\';');
|
fputs($fp, '$dolibarr_main_force_https=\''.$_POST["main_force_https"].'\';');
|
||||||
fputs($fp,"\n");
|
fputs($fp,"\n");
|
||||||
|
|
||||||
|
fputs($fp, '$dolibarr_main_cookie_cryptkey=\''.$key.'\';');
|
||||||
|
fputs($fp,"\n");
|
||||||
|
|
||||||
fputs($fp, '?>');
|
fputs($fp, '?>');
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user