summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-03-26 12:15:02 +0100
committerVincent Petry <pvince81@owncloud.com>2015-03-26 12:15:02 +0100
commit43588fe2f78ff00586a45de9cbbadcadeaa03c4b (patch)
treea7cd3e3505d197457e93bce57e9174889a3022a4 /apps/files_external/lib
parent285f9e32e59e309cdb95403d45d307b3c20dca43 (diff)
downloadnextcloud-server-43588fe2f78ff00586a45de9cbbadcadeaa03c4b.tar.gz
nextcloud-server-43588fe2f78ff00586a45de9cbbadcadeaa03c4b.zip
Properly quote file names in listFiles query for GDrive
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r--apps/files_external/lib/google.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 92351bc0886..bf0fa4815b1 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -103,7 +103,7 @@ class Google extends \OC\Files\Storage\Common {
if (isset($this->driveFiles[$path])) {
$parentId = $this->driveFiles[$path]->getId();
} else {
- $q = "title='".$name."' and '".$parentId."' in parents and trashed = false";
+ $q = "title='".rawurlencode($name)."' and '".$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