From 28f7c72cc762151f965c48226a945cda66528b2d Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 23 Feb 2019 21:58:35 +0000 Subject: [PATCH 1/2] Don't allow calling the install page after the install had been processed --- src/Module/Install.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Module/Install.php b/src/Module/Install.php index d1e2677585..bfb988cac3 100644 --- a/src/Module/Install.php +++ b/src/Module/Install.php @@ -43,6 +43,10 @@ class Install extends BaseModule { $a = self::getApp(); + if (!$a->getMode()->isInstall()) { + Core\System::httpExit(403); + } + // route: install/testrwrite // $baseurl/install/testrwrite to test if rewrite in .htaccess is working if ($a->getArgumentValue(1, '') == 'testrewrite') { @@ -62,6 +66,10 @@ class Install extends BaseModule { $a = self::getApp(); + if (!$a->getMode()->isInstall()) { + Core\System::httpExit(403); + } + switch (self::$currentWizardStep) { case self::SYSTEM_CHECK: case self::DATABASE_CONFIG: @@ -113,6 +121,10 @@ class Install extends BaseModule { $a = self::getApp(); + if (!$a->getMode()->isInstall()) { + Core\System::httpExit(403); + } + $output = ''; $install_title = L10n::t('Friendica Communications Server - Setup'); From ed54345ce1e1bd49829b8f968e89236bb54b9fc6 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 23 Feb 2019 22:27:03 +0000 Subject: [PATCH 2/2] Only check once --- src/Module/Install.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/Module/Install.php b/src/Module/Install.php index bfb988cac3..de19bc86ab 100644 --- a/src/Module/Install.php +++ b/src/Module/Install.php @@ -66,10 +66,6 @@ class Install extends BaseModule { $a = self::getApp(); - if (!$a->getMode()->isInstall()) { - Core\System::httpExit(403); - } - switch (self::$currentWizardStep) { case self::SYSTEM_CHECK: case self::DATABASE_CONFIG: @@ -121,10 +117,6 @@ class Install extends BaseModule { $a = self::getApp(); - if (!$a->getMode()->isInstall()) { - Core\System::httpExit(403); - } - $output = ''; $install_title = L10n::t('Friendica Communications Server - Setup');