Fix Setup hardening

This commit is contained in:
Eric
2018-12-19 17:13:49 +01:00
parent faba67b292
commit d31a4047f6

View File

@@ -121,7 +121,10 @@ header("Expires: Fri, 17 Jul 1970 05:00:00 GMT"); // Date in the past
$sOperation = Utils::ReadParam('operation', '');
try
{
if (!is_writable(utils::GetConfigFilePath())) throw new Exception('Setup operations are not allowed outside of the setup');
if (is_file(utils::GetConfigFilePath()) && !is_writable(utils::GetConfigFilePath()))
{
throw new Exception('Setup operations are not allowed outside of the setup');
}
switch($sOperation)
{