From f6cd5200a20f7adfe3b3f7b48d0ade4a75829a31 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 9 Feb 2017 13:31:06 +0100 Subject: clean cloud ids Signed-off-by: Robin Appelman --- lib/private/Federation/CloudIdManager.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/private/Federation') diff --git a/lib/private/Federation/CloudIdManager.php b/lib/private/Federation/CloudIdManager.php index 0df8f080d2d..2e6232fa862 100644 --- a/lib/private/Federation/CloudIdManager.php +++ b/lib/private/Federation/CloudIdManager.php @@ -34,7 +34,7 @@ class CloudIdManager implements ICloudIdManager { } // Find the first character that is not allowed in user names - $id = str_replace('\\', '/', $cloudId); + $id = $this->fixRemoteURL($cloudId); $posSlash = strpos($id, '/'); $posColon = strpos($id, ':'); @@ -58,9 +58,8 @@ class CloudIdManager implements ICloudIdManager { if ($pos !== false) { $user = substr($id, 0, $pos); $remote = substr($id, $pos + 1); - $remote = $this->fixRemoteURL($remote); if (!empty($user) && !empty($remote)) { - return new CloudId($cloudId, $user, $remote); + return new CloudId($id, $user, $remote); } } throw new \InvalidArgumentException('Invalid cloud id'); -- cgit v1.2.3