[Pkg-owncloud-commits] [owncloud] 04/103: Fixing: Undefined index: REMOTE_ADDR in lib/private/request.php

David Prévot taffit at moszumanska.debian.org
Sun May 31 12:32:32 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.0.4RC1
in repository owncloud.

commit 48082931d152375d0f1600f4b0f05a081e4047a9
Author: heppstux <hello at stephanhepper.com>
Date:   Mon Mar 30 13:29:04 2015 +0200

    Fixing: Undefined index: REMOTE_ADDR in lib/private/request.php
---
 lib/private/request.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/private/request.php b/lib/private/request.php
index 3bf7d94..73755e2 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));
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list