From 80dd8d7802f90ce088b03e46d62e12367dcad278 Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Sun, 3 Feb 2013 23:34:27 +0100
Subject: [PATCH] Cache: check for invalid paths in
 getFileInfo/getDirectoryContent

---
 lib/files/view.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/files/view.php b/lib/files/view.php
index 302232b5134..ff94d3e602b 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -670,6 +670,9 @@ class View {
 	 */
 	public function getFileInfo($path) {
 		$data = array();
+		if (!Filesystem::isValidPath($path)) {
+			return $data;
+		}
 		$path = Filesystem::normalizePath($this->fakeRoot . '/' . $path);
 		/**
 		 * @var \OC\Files\Storage\Storage $storage
@@ -724,6 +727,9 @@ class View {
 	 */
 	public function getDirectoryContent($directory, $mimetype_filter = '') {
 		$result = array();
+		if (!Filesystem::isValidPath($path)) {
+			return $data;
+		}
 		$path = Filesystem::normalizePath($this->fakeRoot . '/' . $directory);
 		/**
 		 * @var \OC\Files\Storage\Storage $storage
-- 
GitLab