From: Vincent Petry Date: Thu, 26 Mar 2015 12:57:28 +0000 (+0100) Subject: Added rawurlencode for other params in GDrive storage X-Git-Tag: v8.1.0alpha1~109^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7036309e22f8b9abbbcf63a2f33d5e39bb344ee6;p=nextcloud-server.git Added rawurlencode for other params in GDrive storage --- diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index 860a775c5eb..b9d3666f956 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -113,7 +113,7 @@ class Google extends \OC\Files\Storage\Common { if (isset($this->driveFiles[$path])) { $parentId = $this->driveFiles[$path]->getId(); } else { - $q = "title='".rawurlencode($name)."' and '".$parentId."' in parents and trashed = false"; + $q = "title='" . rawurlencode($name) . "' and '" . rawurlencode($parentId) . "' in parents and trashed = false"; $result = $this->service->files->listFiles(array('q' => $q))->getItems(); if (!empty($result)) { // Google Drive allows files with the same name, ownCloud doesn't @@ -257,7 +257,7 @@ class Google extends \OC\Files\Storage\Common { if ($pageToken !== true) { $params['pageToken'] = $pageToken; } - $params['q'] = "'".$folder->getId()."' in parents and trashed = false"; + $params['q'] = "'" . rawurlencode($folder->getId()) . "' in parents and trashed = false"; $children = $this->service->files->listFiles($params); foreach ($children->getItems() as $child) { $name = $child->getTitle();