diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2016-02-19 13:15:09 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2016-02-19 13:15:09 +0100 |
commit | 4ef035cc61d1e5f357485d3403357fe745be72d7 (patch) | |
tree | 0705bb7f87036ee1646cead63cdc7c30c624c9de /apps/files_versions | |
parent | 2dcf887cceca8dd25b3d664fb0726cb6d69739ef (diff) | |
download | nextcloud-server-4ef035cc61d1e5f357485d3403357fe745be72d7.tar.gz nextcloud-server-4ef035cc61d1e5f357485d3403357fe745be72d7.zip |
make sure that the file name doesn't end with a trailing slash. Can for example happen single files shared across servers
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/lib/storage.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_versions/lib/storage.php b/apps/files_versions/lib/storage.php index da736c868fc..4eac476ed66 100644 --- a/apps/files_versions/lib/storage.php +++ b/apps/files_versions/lib/storage.php @@ -104,6 +104,9 @@ class Storage { $ownerView = new View('/'.$uid.'/files'); try { $filename = $ownerView->getPath($info['fileid']); + // make sure that the file name doesn't end with a trailing slash + // can for example happen single files shared across servers + $filename = rtrim($filename, '/'); } catch (NotFoundException $e) { $filename = null; } |