From 2947df6ce3294522a3c5f02567ab74dfb72fb22b Mon Sep 17 00:00:00 2001 From: 1Day Date: Wed, 26 Jan 2022 13:24:03 +0100 Subject: [PATCH] check for HTTPS connection --- public/install/functions.php | 7 +++++++ public/install/index.php | 1 + 2 files changed, 8 insertions(+) diff --git a/public/install/functions.php b/public/install/functions.php index dc796a37..0352afc7 100644 --- a/public/install/functions.php +++ b/public/install/functions.php @@ -17,6 +17,13 @@ function checkPhpVersion() return "not OK"; } +function checkHTTPS() +{ + return + (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') + || $_SERVER['SERVER_PORT'] == 443; +} + function getMySQLVersion() { global $requirements; diff --git a/public/install/index.php b/public/install/index.php index 7a7689d2..b385e765 100644 --- a/public/install/index.php +++ b/public/install/index.php @@ -63,6 +63,7 @@ if (!isset($_GET['step'])) { ?>

This installer will lead you through the most crucial Steps of Controlpanel.gg`s setup

+

">HTTPS is required

"> php version: (required )