Skip to content
Snippets Groups Projects
Commit 1b6fda21 authored by Regis Houssin's avatar Regis Houssin
Browse files

New: add crypt key for cookie in conf.php

parent 46eacb1b
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment