[Pkg-owncloud-commits] [owncloud] 04/55: Added localhost as trusted domain

David Prévot taffit at moszumanska.debian.org
Wed Apr 23 19:51:57 UTC 2014


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

taffit pushed a commit to annotated tag v5.0.16RC1
in repository owncloud.

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

    Added localhost as trusted domain
    
    Backport of f1b948d from stable6
---
 lib/request.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/request.php b/lib/request.php
index a0070a5..07ad808 100755
--- a/lib/request.php
+++ b/lib/request.php
@@ -7,6 +7,8 @@
  */
 
 class OC_Request {
+	const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost)(:[0-9]+|)$/';
+
 	/**
 	 * @brief Check overwrite condition
 	 * @returns bool
@@ -31,6 +33,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