New: add crypt key for cookie in conf.php

This commit is contained in:
Regis Houssin 2010-10-20 14:37:00 +00:00
parent 46eacb1b1a
commit 1b6fda21af

View File

@ -515,6 +515,8 @@ function write_conf_file($conffile)
$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)
{ {
@ -576,6 +578,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);