mirror of
https://github.com/Combodo/iTop.git
synced 2026-09-29 21:09:10 +02:00
N°1877 & N°2012: Fix regression backup link on setup, security hardening
This commit is contained in:
@@ -121,9 +121,11 @@ header("Expires: Fri, 17 Jul 1970 05:00:00 GMT"); // Date in the past
|
||||
$sOperation = Utils::ReadParam('operation', '');
|
||||
try
|
||||
{
|
||||
if (is_file(utils::GetConfigFilePath()) && !is_writable(utils::GetConfigFilePath()))
|
||||
$sAuthent = utils::ReadParam('authent', '', false, 'raw_data');
|
||||
if (!file_exists(APPROOT.'data/setup/authent') || $sAuthent !== file_get_contents(APPROOT.'data/setup/authent'))
|
||||
{
|
||||
throw new Exception('Setup operations are not allowed outside of the setup');
|
||||
throw new SecurityException('Setup operations are not allowed outside of the setup');
|
||||
SetupPage::log_error("Setup operations are not allowed outside of the setup");
|
||||
}
|
||||
|
||||
switch($sOperation)
|
||||
|
||||
Reference in New Issue
Block a user