Skip to content

Commit

Permalink
Fix Setup hardening
Browse files Browse the repository at this point in the history
  • Loading branch information
eespie committed Dec 19, 2018
1 parent 3219957 commit 75fbb83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup/ajax.dataloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ function FatalErrorCatcher($sOutput)
$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)
{
Expand Down

0 comments on commit 75fbb83

Please sign in to comment.