aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/share/share.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-04-14 11:27:51 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-04-28 11:28:54 +0200
commit8f7c64253ed6f1165ede51d70c788160f3c26a91 (patch)
tree4ae95769c4a890aff38ccca4c3ca8b564d3f13b7 /lib/private/share/share.php
parentde8c15e1a46e33a20af1bad97a8cf27fced84539 (diff)
downloadnextcloud-server-8f7c64253ed6f1165ede51d70c788160f3c26a91.tar.gz
nextcloud-server-8f7c64253ed6f1165ede51d70c788160f3c26a91.zip
Correctly generate the feedback URL for remote share
The trailing slash was added in c78e3c4a7fa1d2f474ab58551e67a50e093f6ed8 to correctly generate the encryption keys
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);