diff options
author | heppstux <hello@stephanhepper.com> | 2015-03-30 13:29:04 +0200 |
---|---|---|
committer | heppstux <hello@stephanhepper.com> | 2015-03-30 13:29:04 +0200 |
commit | 48082931d152375d0f1600f4b0f05a081e4047a9 (patch) | |
tree | ab96cb16cae9f80632baf34ca1944e7505853c99 | |
parent | e94152b22634acc9e029b7e31ce56c8626488bcf (diff) | |
download | nextcloud-server-48082931d152375d0f1600f4b0f05a081e4047a9.tar.gz nextcloud-server-48082931d152375d0f1600f4b0f05a081e4047a9.zip |
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)); } |