From 1b6fda21af7b99bbc86d94069423e5e40bb103e2 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 20 Oct 2010 14:37:00 +0000 Subject: [PATCH] New: add crypt key for cookie in conf.php --- htdocs/install/etape1.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index 4798299a94b..63ad2ed2d5d 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -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; $error=0; + + $key = md5(uniqid(mt_rand(),TRUE)); // Genere un hash d'un nombre aleatoire $fp = fopen("$conffile", "w"); if($fp) @@ -575,6 +577,9 @@ function write_conf_file($conffile) fputs($fp, '$dolibarr_main_force_https=\''.$_POST["main_force_https"].'\';'); fputs($fp,"\n"); + + fputs($fp, '$dolibarr_main_cookie_cryptkey=\''.$key.'\';'); + fputs($fp,"\n"); fputs($fp, '?>'); fclose($fp);