diff --git a/ajax.php b/ajax.php index b4a02ce7..2fa9f7a7 100644 --- a/ajax.php +++ b/ajax.php @@ -106,6 +106,31 @@ die(); } +$installerActive = (!file_exists('INSTALL_BLOCK')); +if ($installerActive) +{ + $module = ''; + if (strpos($_REQUEST['f'], ':') !== false) + { + $parameters = explode(':', $_REQUEST['f']); + $module = preg_replace("/[^A-Za-z0-9]/", "", $parameters[0]); + } + + if ($module !== 'install') + { + header('Content-type: text/xml'); + echo '', "\n"; + echo( + "\n" . + " -1\n" . + " Installer is active. Only installer AJAX actions are allowed.\n" . + "\n" + ); + + die(); + } +} + if (strpos($_REQUEST['f'], ':') === false) { $function = preg_replace("/[^A-Za-z0-9]/", "", $_REQUEST['f']);