diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-03-12 10:27:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-12 10:27:44 +0100 |
commit | d9f3ed390ae922b300def93cf430badbc09ef6f4 (patch) | |
tree | 90cab79bb0d81ab91f776c65078b3dfd7ae7f59e /apps | |
parent | b258e2f54190a29b82b1c114dddcd87ff781a045 (diff) | |
parent | fb3cf8ca28bbfb5c3686e793b12efafc80d4a303 (diff) | |
download | nextcloud-server-d9f3ed390ae922b300def93cf430badbc09ef6f4.tar.gz nextcloud-server-d9f3ed390ae922b300def93cf430badbc09ef6f4.zip |
Merge pull request #19884 from nextcloud/backport/19704/stable18
[stable18] Fix hostname in Apple configuration profile
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php index fd0171faf45..0f31dd420b3 100644 --- a/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php +++ b/apps/dav/lib/Provisioning/Apple/AppleProvisioningPlugin.php @@ -125,7 +125,7 @@ class AppleProvisioningPlugin extends ServerPlugin { return false; } - $absoluteURL = $request->getAbsoluteUrl(); + $absoluteURL = $this->urlGenerator->getBaseUrl(); $parsedUrl = parse_url($absoluteURL); if (isset($parsedUrl['port'])) { $serverPort = (int) $parsedUrl['port']; diff --git a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php index 5c81f71a199..6f538008e8b 100644 --- a/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php +++ b/apps/dav/tests/unit/Provisioning/Apple/AppleProvisioningPluginTest.php @@ -158,10 +158,9 @@ class AppleProvisioningPluginTest extends TestCase { ->method('getServerProtocol') ->wilLReturn('https'); - $this->sabreRequest->expects($this->at(1)) - ->method('getAbsoluteUrl') - ->with() - ->willReturn('https://nextcloud.tld/nextcloud/remote.php/dav/provisioning/apple-provisioning.mobileconfig'); + $this->urlGenerator->expects($this->once()) + ->method('getBaseUrl') + ->willReturn('https://nextcloud.tld/nextcloud'); $this->themingDefaults->expects($this->at(0)) ->method('getName') |