diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-07-17 14:27:33 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-07-17 14:27:33 +0200 |
commit | 2e1cc2d825c94cdbec93af303ab21da4bf9c3715 (patch) | |
tree | 73a61d7755b259f8c230cf7a7766cd5b1509be24 /lib | |
parent | c00211034d742048284410f6f40482dc8ed8d0ea (diff) | |
parent | bd71540c8a8fe0ef2f66ef491edff5cd7a1c73ef (diff) | |
download | nextcloud-server-2e1cc2d825c94cdbec93af303ab21da4bf9c3715.tar.gz nextcloud-server-2e1cc2d825c94cdbec93af303ab21da4bf9c3715.zip |
Merge pull request #17682 from owncloud/fix-undefined-REMOTE_ADDR-master
Fixing 'Undefined index: REMOTE_ADDR'
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'; } |