[Pkg-owncloud-commits] [owncloud] 154/165: dont allow using null as view root

David Prévot taffit at moszumanska.debian.org
Thu Apr 23 04:06:57 UTC 2015


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

taffit pushed a commit to branch stable8
in repository owncloud.

commit f391f88d7f207dc15963eaf1bdee584bd36a573e
Author: Robin Appelman <icewind at owncloud.com>
Date:   Wed Apr 22 14:51:02 2015 +0200

    dont allow using null as view root
---
 lib/private/files/view.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 3300998..0e0ab0d 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -76,6 +76,9 @@ class View {
 	 * @throws \Exception If $root contains an invalid path
 	 */
 	public function __construct($root = '') {
+		if (is_null($root)) {
+			throw new \InvalidArgumentException('Root cant be null');
+		}
 		if(!Filesystem::isValidPath($root)) {
 			throw new \Exception();
 		}
@@ -85,6 +88,9 @@ class View {
 	}
 
 	public function getAbsolutePath($path = '/') {
+		if ($path === null) {
+			return null;
+		}
 		$this->assertPathLength($path);
 		if ($path === '') {
 			$path = '/';

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