Skip to content

Commit 6946b7c

Browse files
committed
protect ajax.php after install
1 parent 7e3f9af commit 6946b7c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

main/install/ajax.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
require_once api_get_path(LIBRARY_PATH).'database.constants.inc.php';
2828
require_once 'install.lib.php';
2929

30+
// A protection measure for already installed systems.
31+
if (isAlreadyInstalledSystem()) {
32+
// The system has already been installed, so block re-installation.
33+
echo "Chamilo has already been installed";
34+
exit;
35+
}
36+
3037
$action = isset($_POST['a']) ? $_POST['a'] : null;
3138

3239
$dbHost = isset($_POST['db_host']) ? $_POST['db_host'] : 'localhost';

0 commit comments

Comments
 (0)