diff --git a/src/core/controllers/AuthenticationController.php b/src/core/controllers/AuthenticationController.php index a606d2e3086e58cc3c5af58e9aaeeff1024251ff..0372a1fa10167684d6313de1ba4479d5d1014d2b 100755 --- a/src/core/controllers/AuthenticationController.php +++ b/src/core/controllers/AuthenticationController.php @@ -848,18 +848,19 @@ class AuthenticationController 'GET/installer/customs', 'POST/installer/custom', 'POST/installer/database', 'POST/installer/docservers', 'POST/installer/customization', 'PUT/installer/administrator', 'DELETE/installer/lock' ]; + $expectedNames = [ + '.', + '..', + 'custom.json', + '.gitkeep' + ]; if (!in_array($args['route'], $installerRoutes)) { return false; } elseif (is_file("custom/custom.json")) { $customs = scandir('custom'); - if (count($customs) > 4) { - return false; - } + $customs = array_diff($customs, $expectedNames); foreach ($customs as $custom) { - if (in_array($custom, ['custom.json', '.', '..'])) { - continue; - } if (!is_file("custom/{$custom}/initializing.lck")) { return false; }