Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-02-13 14:41:46 +0400
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-02-13 15:23:22 +0400
commit22484331800db5699b6a4f541f1addffb477488d (patch)
tree1c9ea28f318eb3a59ef41b78c54157cf69c0d25f /lib
parent5e24e21493299a691f22916a3bd2200bd1142afc (diff)
initial backport of #6777 - mobile public pages - to stable5
Diffstat (limited to 'lib')
-rwxr-xr-xlib/request.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/request.php b/lib/request.php
index 0abc6e7b4b0..d0b2feab311 100755
--- a/lib/request.php
+++ b/lib/request.php
@@ -13,7 +13,7 @@ class OC_Request {
*/
private static function isOverwriteCondition($type = '') {
$regex = '/' . OC_Config::getValue('overwritecondaddr', '') . '/';
- return $regex === '//' or preg_match($regex, $_SERVER['REMOTE_ADDR']) === 1
+ return $regex === '//' or (isset($_SERVER['REMOTE_ADDR']) && preg_match($regex, $_SERVER['REMOTE_ADDR']) === 1)
or ($type !== 'protocol' and OC_Config::getValue('forcessl', false));
}