diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-05-28 20:14:50 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-05-28 20:14:50 +0200 |
commit | 2d24ad53c6d3e8925cd516b75b795b4a84551f54 (patch) | |
tree | 59f48103790846ea12eb3e36222f6b56b8c1aa4c | |
parent | cd311c1ac11cfcb71e220df788b28f2d25adba5d (diff) | |
parent | 48082931d152375d0f1600f4b0f05a081e4047a9 (diff) | |
download | nextcloud-server-2d24ad53c6d3e8925cd516b75b795b4a84551f54.tar.gz nextcloud-server-2d24ad53c6d3e8925cd516b75b795b4a84551f54.zip |
Merge pull request #15306 from netzkolchose/stable8
Fixing: Undefined index: REMOTE_ADDR in lib/private/request.php
-rw-r--r-- | lib/private/request.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/request.php b/lib/private/request.php index 3bf7d94d9cf..73755e226c4 100644 --- a/lib/private/request.php +++ b/lib/private/request.php @@ -61,7 +61,8 @@ class OC_Request { */ private static function isOverwriteCondition($type = '') { $regex = '/' . OC_Config::getValue('overwritecondaddr', '') . '/'; - return $regex === '//' or preg_match($regex, $_SERVER['REMOTE_ADDR']) === 1 + $remoteAddress = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; + return $regex === '//' or preg_match($regex, $remoteAddress) === 1 or ($type !== 'protocol' and OC_Config::getValue('forcessl', false)); } |