mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 06:18:44 +02:00
N°1114 - config-itop.php access rights enforcement
This commit is contained in:
@@ -186,7 +186,7 @@ class DBRestore extends DBBackup
|
||||
$sConfigFile = APPROOT.'conf/'.$sEnvironment.'/config-itop.php';
|
||||
@chmod($sConfigFile, 0770); // Allow overwriting the file
|
||||
rename($sDataDir.'/config-itop.php', $sConfigFile);
|
||||
@chmod($sConfigFile, 0444); // Read-only
|
||||
@chmod($sConfigFile, 0440); // Read-only
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -176,7 +176,7 @@ try
|
||||
$oTempConfig = new Config($sTmpFile, true);
|
||||
$oTempConfig->WriteToFile($sConfigFile);
|
||||
@unlink($sTmpFile);
|
||||
@chmod($sConfigFile, 0444); // Read-only
|
||||
@chmod($sConfigFile, 0440); // Read-only
|
||||
|
||||
if (DBPasswordInNewConfigIsOk($sConfig))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user