Correctly generate the feedback URL for remote share
The trailing slash was added in c78e3c4a7f
to correctly generate the encryption keys
This commit is contained in:
parent
de8c15e1a4
commit
8f7c64253e
|
@ -235,7 +235,7 @@ class Manager {
|
||||||
*/
|
*/
|
||||||
private function sendFeedbackToRemote($remote, $token, $id, $feedback) {
|
private function sendFeedbackToRemote($remote, $token, $id, $feedback) {
|
||||||
|
|
||||||
$url = $remote . \OCP\Share::BASE_PATH_TO_SHARE_API . '/' . $id . '/' . $feedback . '?format=' . \OCP\Share::RESPONSE_FORMAT;
|
$url = rtrim($remote, '/') . \OCP\Share::BASE_PATH_TO_SHARE_API . '/' . $id . '/' . $feedback . '?format=' . \OCP\Share::RESPONSE_FORMAT;
|
||||||
$fields = array('token' => $token);
|
$fields = array('token' => $token);
|
||||||
|
|
||||||
$result = $this->httpHelper->post($url, $fields);
|
$result = $this->httpHelper->post($url, $fields);
|
||||||
|
|
|
@ -2426,7 +2426,7 @@ class Share extends Constants {
|
||||||
list($user, $remote) = explode('@', $shareWith, 2);
|
list($user, $remote) = explode('@', $shareWith, 2);
|
||||||
|
|
||||||
if ($user && $remote) {
|
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('/');
|
$local = \OC::$server->getURLGenerator()->getAbsoluteURL('/');
|
||||||
|
|
||||||
|
@ -2459,7 +2459,7 @@ class Share extends Constants {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private static function sendRemoteUnshare($remote, $id, $token) {
|
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');
|
$fields = array('token' => $token, 'format' => 'json');
|
||||||
$result = self::tryHttpPost($url, $fields);
|
$result = self::tryHttpPost($url, $fields);
|
||||||
$status = json_decode($result['result'], true);
|
$status = json_decode($result['result'], true);
|
||||||
|
|
Loading…
Reference in New Issue