summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2015-07-25 18:10:21 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-08-10 23:04:52 +0200
commit8944af57cbd1fd2962b6adeaed76c6cd41712453 (patch)
tree5a7807b7deef2eacb50afb42912acb828c382c7a /lib/private
parent9650f3ecbebfc7c7cc30b787acae3490b0f4e6b5 (diff)
downloadnextcloud-server-8944af57cbd1fd2962b6adeaed76c6cd41712453.tar.gz
nextcloud-server-8944af57cbd1fd2962b6adeaed76c6cd41712453.zip
Set default `forwarded_for_headers` to 'HTTP_X_FORWARDED_FOR'
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/appframework/http/request.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php
index 43f01dfde3f..aaad286e843 100644
--- a/lib/private/appframework/http/request.php
+++ b/lib/private/appframework/http/request.php
@@ -452,7 +452,10 @@ class Request implements \ArrayAccess, \Countable, IRequest {
$trustedProxies = $this->config->getSystemValue('trusted_proxies', []);
if(is_array($trustedProxies) && in_array($remoteAddress, $trustedProxies)) {
- $forwardedForHeaders = $this->config->getSystemValue('forwarded_for_headers', []);
+ $forwardedForHeaders = $this->config->getSystemValue('forwarded_for_headers', [
+ 'HTTP_X_FORWARDED_FOR'
+ // only have one default, so we cannot ship an insecure product out of the box
+ ]);
foreach($forwardedForHeaders as $header) {
if(isset($this->server[$header])) {