Fix security hole
This commit is contained in:
parent
94589b9935
commit
7a4d1d990e
@ -67,12 +67,15 @@ $conffiletoshow = "htdocs/conf/conf.php";
|
|||||||
//$conffile = "/etc/dolibarr/conf.php";
|
//$conffile = "/etc/dolibarr/conf.php";
|
||||||
//$conffiletoshow = "/etc/dolibarr/conf.php";
|
//$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||||
|
|
||||||
//replace conf filename with "conf" parameter on url by GET
|
// Replace conf filename with "conf" parameter on url by GET
|
||||||
if (!empty($_GET['conf'])) {
|
if (! empty($_GET['conf']))
|
||||||
setcookie('dolconf', $_GET['conf'],0,'/');
|
{
|
||||||
$conffile = 'conf/' . $_GET['conf'] . '.php';
|
$confname=basename($_GET['conf']);
|
||||||
|
setcookie('dolconf', $confname, 0, '/');
|
||||||
|
$conffile = 'conf/'.$confname.'.php';
|
||||||
} else {
|
} else {
|
||||||
$conffile = 'conf/' . (!empty($_COOKIE['dolconf']) ? $_COOKIE['dolconf'] : 'conf') . '.php';
|
$confname=basename(empty($_COOKIE['dolconf']) ? 'conf' : $_COOKIE['dolconf']);
|
||||||
|
$conffile = 'conf/'.$confname.'.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user