Trigger warning if empty array or false and X-Forwarded-Host is present

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2019-03-20 19:59:32 +01:00
parent 3855d78b2c
commit ff629ad158
No known key found for this signature in database
GPG key ID: 36E3664E099D0614

View file

@ -289,7 +289,7 @@ class CheckSetupController extends Controller {
$trustedProxies = $this->config->getSystemValue('trusted_proxies', []);
$remoteAddress = $this->request->getHeader('REMOTE_ADDR');
if ($trustedProxies === [] && $this->request->getHeader('X-Forwarded-Host') !== '') {
if (empty($trustedProxies) && $this->request->getHeader('X-Forwarded-Host') !== '') {
return false;
}