Skip to content

Commit 063ded1

Browse files
authored
Merge pull request #750 from nextcloud/fix/manual-daemon-duplicate-port
fix(manual-install): prevent duplicate port in ExApp URLs
2 parents 2b3a190 + 7636314 commit 063ded1

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/Command/Daemon/RegisterDaemon.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8181
return 1;
8282
}
8383

84+
if ($acceptsDeployId === 'manual-install' && !$isHarp && str_contains($host, ':')) {
85+
$output->writeln('<comment>Warning: The host contains a port, which will be ignored for manual-install daemons. The ExApp\'s port from --json-info will be used instead.</comment>');
86+
}
87+
8488
if ($this->daemonConfigService->getDaemonConfigByName($name) !== null) {
8589
$output->writeln(sprintf('Registration skipped, as the daemon config `%s` already exists.', $name));
8690
return 0;

lib/DeployActions/ManualActions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public function resolveExAppUrl(
6666
$host = $deployConfig['additional_options']['OVERRIDE_APP_HOST'];
6767
}
6868
}
69+
$host = explode(':', $host)[0];
6970
return sprintf('%s://%s:%s', $protocol, $host, $port);
7071
}
7172
}

0 commit comments

Comments
 (0)