diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-03-09 21:02:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 21:02:53 +0100 |
commit | 0d613cd2f03e7d683a782fbb161026db6e4cb3d1 (patch) | |
tree | 7ab01a5f2c88b53dfa7429d66e8efb4ad4006972 /apps | |
parent | e934786686e46da40187c3ac5b2137f8e6a0d462 (diff) | |
parent | fc06b248383304f7111a3460e6b09df088bd5241 (diff) | |
download | nextcloud-server-0d613cd2f03e7d683a782fbb161026db6e4cb3d1.tar.gz nextcloud-server-0d613cd2f03e7d683a782fbb161026db6e4cb3d1.zip |
Merge pull request #19704 from Nils160988/master
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') |