diff options
author | Joas Schilling <coding@schilljs.com> | 2022-06-08 10:38:20 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-06-09 15:23:05 +0200 |
commit | 6e3d66843666cd68f6f86c909dc0ed5244b9d2fa (patch) | |
tree | 1a79cd3edee124d575303a70c91b16e61019a974 /lib | |
parent | 76db612b16380b20a3203bc0d3964733a6c1a587 (diff) | |
download | nextcloud-server-6e3d66843666cd68f6f86c909dc0ed5244b9d2fa.tar.gz nextcloud-server-6e3d66843666cd68f6f86c909dc0ed5244b9d2fa.zip |
Keep non default protocol in cloud id
When there is no protocol on the cloud id, we assume it's https://
But this means that when an http:// server currently sends an OCM
invite to another server, the protocol is striped and the remote
instance will try to talk back to https:// which might not be available.
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/User/User.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php index de9af35f541..c5306d1df27 100644 --- a/lib/private/User/User.php +++ b/lib/private/User/User.php @@ -555,15 +555,9 @@ class User implements IUser { return $uid . '@' . $server; } - /** - * @param string $url - * @return string - */ - private function removeProtocolFromUrl($url) { + private function removeProtocolFromUrl(string $url): string { if (strpos($url, 'https://') === 0) { return substr($url, strlen('https://')); - } elseif (strpos($url, 'http://') === 0) { - return substr($url, strlen('http://')); } return $url; |