]> source.dussan.org Git - nextcloud-server.git/commitdiff
Normalize the file path for shared children as a precaution
authorMichael Gapczynski <mtgap@owncloud.com>
Sun, 9 Sep 2012 03:42:24 +0000 (23:42 -0400)
committerMichael Gapczynski <mtgap@owncloud.com>
Sun, 9 Sep 2012 03:42:24 +0000 (23:42 -0400)
lib/public/share.php

index 94644d0b657d1ac50c37624c0ff24657ffa70de9..5ed04c3e160b5f5c4a55675fd91f640d6e98ecd1 100644 (file)
@@ -629,6 +629,7 @@ class Share {
                }
                $root = strlen($root);
                $query = \OC_DB::prepare('SELECT '.$select.' FROM `*PREFIX*share` '.$where, $queryLimit);
+               
                $result = $query->execute($queryArgs);
                $items = array();
                $targets = array();
@@ -706,7 +707,7 @@ class Share {
                                                                } else {
                                                                        $childItem['file_source'] = \OC_FileCache::getId($child['file_path']);
                                                                }
-                                                               $childItem['file_target'] = $child['file_path'];
+                                                               $childItem['file_target'] = \OC_Filesystem::normalizePath($child['file_path']);
                                                        }
                                                        if (isset($item)) {
                                                                if ($childItem[$column] == $item) {