X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp.php;h=bacf794b9b271e18430b79cedcd0315a1ee9b671;hb=b268fa60e7c523672a64bbefede43ff89e651d5f;hp=9df62a4e776bdb49be18ec5e682cd2156364d5f9;hpb=ced77ccbce8e6310b47500769fe5736c59e88f72;p=friendica.git diff --git a/src/App.php b/src/App.php index 9df62a4e77..bacf794b9b 100644 --- a/src/App.php +++ b/src/App.php @@ -64,7 +64,7 @@ class App { const PLATFORM = 'Friendica'; const CODENAME = 'Giant Rhubarb'; - const VERSION = '2023.03-dev'; + const VERSION = '2023.03-rc'; // Allow themes to control internal parameters // by changing App values in theme.php @@ -391,7 +391,7 @@ class App } /** - * Returns the current theme name. May be overriden by the mobile theme name. + * Returns the current theme name. May be overridden by the mobile theme name. * * @return string Current theme name or empty string in installation phase * @throws Exception @@ -532,7 +532,7 @@ class App /** * Provide a sane default if nothing is chosen or the specified theme does not exist. * - * @return string Current theme's stylsheet path + * @return string Current theme's stylesheet path * @throws Exception */ public function getCurrentThemeStylesheetPath(): string @@ -555,11 +555,12 @@ class App * @param ModuleHTTPException $httpException The possible HTTP Exception container * @param HTTPInputData $httpInput A library for processing PHP input streams * @param float $start_time The start time of the overall script execution + * @param array $server The $_SERVER array * * @throws HTTPException\InternalServerErrorException * @throws \ImagickException */ - public function runFrontend(App\Router $router, IManagePersonalConfigValues $pconfig, Authentication $auth, App\Page $page, Nav $nav, ModuleHTTPException $httpException, HTTPInputData $httpInput, float $start_time) + public function runFrontend(App\Router $router, IManagePersonalConfigValues $pconfig, Authentication $auth, App\Page $page, Nav $nav, ModuleHTTPException $httpException, HTTPInputData $httpInput, float $start_time, array $server) { $this->profiler->set($start_time, 'start'); $this->profiler->set(microtime(true), 'classinit'); @@ -575,10 +576,12 @@ class App if (!$this->mode->isInstall()) { // Force SSL redirection - if ($this->baseURL->checkRedirectHttps()) { - System::externalRedirect($this->baseURL->get() . '/' . $this->args->getQueryString()); + if ($this->config->get('system', 'force_ssl') && + (empty($server['HTTPS']) || $server['HTTPS'] === 'off') && + !empty($server['REQUEST_METHOD']) && + $server['REQUEST_METHOD'] === 'GET') { + System::externalRedirect($this->baseURL . '/' . $this->args->getQueryString()); } - Core\Hook::callAll('init_1'); }