aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-05-28 20:14:50 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-05-28 20:14:50 +0200
commit2d24ad53c6d3e8925cd516b75b795b4a84551f54 (patch)
tree59f48103790846ea12eb3e36222f6b56b8c1aa4c
parentcd311c1ac11cfcb71e220df788b28f2d25adba5d (diff)
parent48082931d152375d0f1600f4b0f05a081e4047a9 (diff)
downloadnextcloud-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.php3
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));
}