X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FInstaller.php;h=041771812526fe028b8e7cda42d7137f7e54ec33;hb=ae6e13815d66320f97cfca08b83eadc19ab6aaf0;hp=de75aa374f1333a1f4c51a1c265c3f69dceffcc5;hpb=3327e6d979771a53f774d50d38a70285ac01a4ba;p=friendica.git diff --git a/src/Core/Installer.php b/src/Core/Installer.php index de75aa374f..0417718125 100644 --- a/src/Core/Installer.php +++ b/src/Core/Installer.php @@ -1,6 +1,6 @@ checkKeys()) { + if (!$this->checkTLS()) { $returnVal = false; } - if (!$this->checkHtAccess($baseurl)) { + if (!$this->checkKeys()) { $returnVal = false; } + /// @TODO This check should not block installations because of containerization issues + /// @see https://github.com/friendica/docker/issues/134 + $this->checkHtAccess($baseurl); + return $returnVal; } @@ -465,7 +469,7 @@ class Installer $status = $this->checkFunction('proc_open', DI::l10n()->t('Program execution functions'), - DI::l10n()->t('Error: Program execution functions required but not enabled.'), + DI::l10n()->t('Error: Program execution functions (proc_open) required but not enabled.'), true ); $returnVal = $returnVal ? $status : false; @@ -580,6 +584,38 @@ class Installer return $status; } + /** + * TLS Check + * + * Tries to determine whether the connection to the server is secured + * by TLS or not. If not the user will be warned that it is higly + * encuraged to use TLS. + * + * @return bool (true) as TLS is not mandatory + */ + public function checkTLS() + { + $tls = false; + + if (isset($_SERVER['HTTPS'])) { + if (($_SERVER['HTTPS'] == 1) || ($_SERVER['HTTPS'] == 'on')) { + $tls = true; + } + } + + if (!$tls) { + $help = DI::l10n()->t('The detection of TLS to secure the communication between the browser and the new Friendica server failed.'); + $help .= ' ' . DI::l10n()->t('It is highly encouraged to use Friendica only over a secure connection as sensitive information like passwords will be transmitted.'); + $help .= ' ' . DI::l10n()->t('Please ensure that the connection to the server is secure.'); + $this->addCheck(DI::l10n()->t('No TLS detected'), $tls, false, $help); + } else { + $this->addCheck(DI::l10n()->t('TLS detected'), $tls, false, ''); + } + + // TLS is not required + return true; + } + /** * Imagick Check *