diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-03-31 15:30:49 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-03-31 15:30:49 +0200 |
commit | c052ee75844bbd947e7466eda1f1dcda1ed43950 (patch) | |
tree | 5523c597e40e44396486d9cc3ab6083085180f0f /apps | |
parent | 7036309e22f8b9abbbcf63a2f33d5e39bb344ee6 (diff) | |
download | nextcloud-server-c052ee75844bbd947e7466eda1f1dcda1ed43950.tar.gz nextcloud-server-c052ee75844bbd947e7466eda1f1dcda1ed43950.zip |
Only escape single quotes
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/google.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index b9d3666f956..541113fb530 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 '" . rawurlencode($parentId) . "' in parents and trashed = false"; + $q = "title='" . str_replace("'","\\'", $name) . "' and '" . str_replace("'","\\'", $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'] = "'" . rawurlencode($folder->getId()) . "' in parents and trashed = false"; + $params['q'] = "'" . str_replace("'","\\'", $folder->getId()) . "' in parents and trashed = false"; $children = $this->service->files->listFiles($params); foreach ($children->getItems() as $child) { $name = $child->getTitle(); |