[Pkg-owncloud-commits] [owncloud] 18/134: Added localhost as trusted domain

David Prévot taffit at moszumanska.debian.org
Fri Apr 18 21:43:56 UTC 2014


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

taffit pushed a commit to branch master
in repository owncloud.

commit f1b948d4dc85033b96df9f21ab3af1d745d82fe2
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Wed Mar 5 15:41:28 2014 +0100

    Added localhost as trusted domain
---
 lib/private/request.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/private/request.php b/lib/private/request.php
index 96296ac..ed0061e 100755
--- a/lib/private/request.php
+++ b/lib/private/request.php
@@ -12,6 +12,8 @@ class OC_Request {
 	// Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent
 	const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
 
+	const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost)(:[0-9]+|)$/';
+
 	/**
 	 * @brief Check overwrite condition
 	 * @param string $type
@@ -37,6 +39,9 @@ class OC_Request {
 		if (empty($trustedList)) {
 			return true;
 		}
+		if (preg_match(self::REGEX_LOCALHOST, $domain) === 1) {
+			return true;
+		}
 		return in_array($domain, $trustedList);
 	}
 

-- 
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