aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/share/share.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/share/share.php')
-rw-r--r--lib/private/share/share.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 617eeeb9d90..eeb50be44d9 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -2426,7 +2426,7 @@ class Share extends Constants {
list($user, $remote) = explode('@', $shareWith, 2);
if ($user && $remote) {
- $url = $remote . self::BASE_PATH_TO_SHARE_API . '?format=' . self::RESPONSE_FORMAT;
+ $url = rtrim($remote, '/') . self::BASE_PATH_TO_SHARE_API . '?format=' . self::RESPONSE_FORMAT;
$local = \OC::$server->getURLGenerator()->getAbsoluteURL('/');
@@ -2459,7 +2459,7 @@ class Share extends Constants {
* @return bool
*/
private static function sendRemoteUnshare($remote, $id, $token) {
- $url = $remote . self::BASE_PATH_TO_SHARE_API . '/' . $id . '/unshare?format=' . self::RESPONSE_FORMAT;
+ $url = rtrim($remote, '/') . self::BASE_PATH_TO_SHARE_API . '/' . $id . '/unshare?format=' . self::RESPONSE_FORMAT;
$fields = array('token' => $token, 'format' => 'json');
$result = self::tryHttpPost($url, $fields);
$status = json_decode($result['result'], true);