diff options
-rw-r--r-- | phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 2 | ||||
-rw-r--r-- | phpBB/install/index.php | 2 | ||||
-rw-r--r-- | phpBB/install/install_install.php | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php index 2272b10841..9e677f8223 100644 --- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php @@ -42,7 +42,7 @@ class phpbb_recaptcha extends phpbb_default_captcha function phpbb_recaptcha() { global $request; - $this->recaptcha_server = $request->server('HTTPS') == 'on' ? $this->recaptcha_server_secure : $this->recaptcha_server; + $this->recaptcha_server = $request->is_secure() ? $this->recaptcha_server_secure : $this->recaptcha_server; } function init($type) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 9ae1885efd..a4baaa8af1 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2069,7 +2069,7 @@ function generate_board_url($without_script_path = false) else { // Do not rely on cookie_secure, users seem to think that it means a secured cookie instead of an encrypted connection - $cookie_secure = $request->server('HTTPS') == 'on' ? 1 : 0; + $cookie_secure = $request->is_secure() ? 1 : 0; $url = (($cookie_secure) ? 'https://' : 'http://') . $server_name; $script_path = $user->page['root_script_path']; diff --git a/phpBB/install/index.php b/phpBB/install/index.php index 9928638fc4..3c1ce359ca 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -433,7 +433,7 @@ class module // HTTP_HOST is having the correct browser url in most cases... $server_name = strtolower($request->header('Host', $request->server('SERVER_NAME'))); $server_port = $request->server('SERVER_PORT', 0); - $secure = ($request->server('HTTPS') == 'on') ? 1 : 0; + $secure = $request->is_secure() ? 1 : 0; $script_name = $request->server('PHP_SELF'); if (!$script_name) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index af3d414071..9be5466ef3 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1028,8 +1028,8 @@ class install_install extends module $data['email_enable'] = ($data['email_enable'] !== '') ? $data['email_enable'] : true; $data['server_name'] = ($data['server_name'] !== '') ? $data['server_name'] : $server_name; $data['server_port'] = ($data['server_port'] !== '') ? $data['server_port'] : $request->server('SERVER_PORT', 0); - $data['server_protocol'] = ($data['server_protocol'] !== '') ? $data['server_protocol'] : ($request->server('HTTPS') == 'on' ? 'https://' : 'http://'); - $data['cookie_secure'] = ($data['cookie_secure'] !== '') ? $data['cookie_secure'] : ($request->server('HTTPS') == 'on' ? true : false); + $data['server_protocol'] = ($data['server_protocol'] !== '') ? $data['server_protocol'] : ($request->is_secure() ? 'https://' : 'http://'); + $data['cookie_secure'] = ($data['cookie_secure'] !== '') ? $data['cookie_secure'] : $request->is_secure(); if ($data['script_path'] === '') { |