diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-08-14 17:23:19 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-08-20 22:27:44 +0200 |
commit | a3c6d20ccb7e554edcb949babac4381e17651ffa (patch) | |
tree | 373af129a9a4cd87c2a22d9921194dda77c45b49 /apps | |
parent | 9caff0be96eb3ab1eb788476f7f3ff6591225922 (diff) | |
download | nextcloud-server-a3c6d20ccb7e554edcb949babac4381e17651ffa.tar.gz nextcloud-server-a3c6d20ccb7e554edcb949babac4381e17651ffa.zip |
use S3Client::encodeKey(), fixes #8325
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/amazons3.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index 10fc626c5da..cfc9b5145d3 100644 --- a/apps/files_external/lib/amazons3.php +++ b/apps/files_external/lib/amazons3.php @@ -56,6 +56,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { /** * @param string $path + * @return string correctly encoded path */ private function normalizePath($path) { $path = trim($path, '/'); @@ -441,7 +442,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { $result = $this->connection->copyObject(array( 'Bucket' => $this->bucket, 'Key' => $this->cleanKey($path2), - 'CopySource' => $this->bucket . '/' . $path1 + 'CopySource' => S3Client::encodeKey($this->bucket . '/' . $path1) )); $this->testTimeout(); } catch (S3Exception $e) { @@ -457,7 +458,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { $result = $this->connection->copyObject(array( 'Bucket' => $this->bucket, 'Key' => $path2 . '/', - 'CopySource' => $this->bucket . '/' . $path1 . '/' + 'CopySource' => S3Client::encodeKey($this->bucket . '/' . $path1 . '/') )); $this->testTimeout(); } catch (S3Exception $e) { |