aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-06-12 20:07:27 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2018-07-02 11:29:30 +0200
commit27814127ddce1c1859fdd42890262144aa410314 (patch)
treebef7c238f3eb8b29ff3ae6ace39089c88390f1d7 /apps/federatedfilesharing/lib
parent21b8a873d5c93e5d815fd37bfcbf1d5ed162d12d (diff)
downloadnextcloud-server-27814127ddce1c1859fdd42890262144aa410314.tar.gz
nextcloud-server-27814127ddce1c1859fdd42890262144aa410314.zip
make sure that remote url gets stored with a trailing '/'
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/federatedfilesharing/lib')
-rw-r--r--apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
index 230af994482..8191d5065c0 100644
--- a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
+++ b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
@@ -161,6 +161,11 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
}
list($ownerUid, $remote) = $this->addressHandler->splitUserRemote($share->getOwner());
+ // for backward compatibility make sure that the remote url stored in the
+ // database ends with a trailing slash
+ if (substr($remote, -1) !== '/') {
+ $remote = $remote . '/';
+ }
$token = $share->getShareSecret();
$name = $share->getResourceName();