aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/request
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-03-27 12:56:03 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-03-27 12:56:03 +0200
commit386d31ec635c8e45d769706d2bf9e72f4aab46f0 (patch)
tree046b98e70e41ca08735a20a685c01d9d9efae74a /phpBB/phpbb/request
parent7d5a853b21a5be53d0364f1e02a9cddfc789a5fb (diff)
parent5442a2596718ea2ce81dfa31c44549f62311cd47 (diff)
downloadforums-386d31ec635c8e45d769706d2bf9e72f4aab46f0.tar
forums-386d31ec635c8e45d769706d2bf9e72f4aab46f0.tar.gz
forums-386d31ec635c8e45d769706d2bf9e72f4aab46f0.tar.bz2
forums-386d31ec635c8e45d769706d2bf9e72f4aab46f0.tar.xz
forums-386d31ec635c8e45d769706d2bf9e72f4aab46f0.zip
Merge branch '3.1.x' into 3.2.x
* 3.1.x: [ticket/14481] Add tests for x_forwarded_proto header [ticket/14481] Use port 443 if https is specified in x-forwarded-proto [ticket/14481] Respect HTTP_X_FORWARDED headers for implying https
Diffstat (limited to 'phpBB/phpbb/request')
-rw-r--r--phpBB/phpbb/request/request.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/phpbb/request/request.php b/phpBB/phpbb/request/request.php
index 56ce3999ed..4cac6fbaea 100644
--- a/phpBB/phpbb/request/request.php
+++ b/phpBB/phpbb/request/request.php
@@ -325,7 +325,9 @@ class request implements \phpbb\request\request_interface
*/
public function is_secure()
{
- return $this->server('HTTPS') == 'on';
+ $https = $this->server('HTTPS');
+ $https = $this->server('HTTP_X_FORWARDED_PROTO') === 'https' ? 'on' : $https;
+ return !empty($https) && $https !== 'off';
}
/**