summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-03-26 13:57:28 +0100
committerLukas Reschke <lukas@owncloud.com>2015-03-31 15:14:08 +0200
commit7036309e22f8b9abbbcf63a2f33d5e39bb344ee6 (patch)
tree1ed3e2f6dfecbc86069876ed0d4ab4a83e95e8ed /apps/files_external
parent5c9998179fa236a4863b467d0aff56fc9f67cceb (diff)
downloadnextcloud-server-7036309e22f8b9abbbcf63a2f33d5e39bb344ee6.tar.gz
nextcloud-server-7036309e22f8b9abbbcf63a2f33d5e39bb344ee6.zip
Added rawurlencode for other params in GDrive storage
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/google.php4
1 files changed, 2 insertions, 2 deletions
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();