Fix Setup hardening

This commit is contained in:
Eric
2018-12-19 17:10:02 +01:00
parent 3219957eed
commit 75fbb831c9

View File

@@ -147,7 +147,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)
{