diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-07-16 16:40:57 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-07-16 16:40:57 +0200 |
commit | bd71540c8a8fe0ef2f66ef491edff5cd7a1c73ef (patch) | |
tree | c967dfb8ccee6a724abfdbea6f019de42674aa0c /lib | |
parent | 15877ac7eba002df64493b036191759e939b16e9 (diff) | |
download | nextcloud-server-bd71540c8a8fe0ef2f66ef491edff5cd7a1c73ef.tar.gz nextcloud-server-bd71540c8a8fe0ef2f66ef491edff5cd7a1c73ef.zip |
Fixing 'Undefined index: REMOTE_ADDR' - fixes #17460
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/appframework/http/request.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php index f826ef45bb5..baf2f0c4745 100644 --- a/lib/private/appframework/http/request.php +++ b/lib/private/appframework/http/request.php @@ -478,7 +478,8 @@ class Request implements \ArrayAccess, \Countable, IRequest { */ private function isOverwriteCondition($type = '') { $regex = '/' . $this->config->getSystemValue('overwritecondaddr', '') . '/'; - return $regex === '//' || preg_match($regex, $this->server['REMOTE_ADDR']) === 1 + $remoteAddr = isset($this->server['REMOTE_ADDR']) ? $this->server['REMOTE_ADDR'] : ''; + return $regex === '//' || preg_match($regex, $remoteAddr) === 1 || $type !== 'protocol'; } |