summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-10-29 23:38:37 +0100
committerGitHub <noreply@github.com>2018-10-29 23:38:37 +0100
commit0999f079641cf25cac7aafdc1a0f604f78f3115c (patch)
tree3492808653060185c8f0e01f160c66811f37f97e /settings
parent2d5047849238c4130ca8ec78e29c9e9edcb359e2 (diff)
parent5cf8f4a407787151a8aa47c35e9aa2aa5a3d443c (diff)
downloadnextcloud-server-0999f079641cf25cac7aafdc1a0f604f78f3115c.tar.gz
nextcloud-server-0999f079641cf25cac7aafdc1a0f604f78f3115c.zip
Merge pull request #12052 from nextcloud/bugfix/11594/fix-setup-check-trusted-proxies
Fix setup check trusted proxies
Diffstat (limited to 'settings')
-rw-r--r--settings/Controller/CheckSetupController.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php
index 42bb4739870..fa4ed57ab95 100644
--- a/settings/Controller/CheckSetupController.php
+++ b/settings/Controller/CheckSetupController.php
@@ -287,12 +287,11 @@ class CheckSetupController extends Controller {
*/
private function forwardedForHeadersWorking() {
$trustedProxies = $this->config->getSystemValue('trusted_proxies', []);
- $remoteAddress = $this->request->getRemoteAddress();
+ $remoteAddress = $this->request->getHeader('REMOTE_ADDR');
- if (is_array($trustedProxies) && in_array($remoteAddress, $trustedProxies)) {
- return false;
+ if (\is_array($trustedProxies) && \in_array($remoteAddress, $trustedProxies)) {
+ return $remoteAddress !== $this->request->getRemoteAddress();
}
-
// either not enabled or working correctly
return true;
}