Merge pull request #19704 from Nils160988/master

Fix hostname in Apple configuration profile
This commit is contained in:
Roeland Jago Douma 2020-03-09 21:02:53 +01:00 committed by GitHub
commit 0d613cd2f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -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'];

View File

@ -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')