Skip to content
Snippets Groups Projects
Commit c4fdb9cc authored by Clark Tomlinson's avatar Clark Tomlinson
Browse files

Merge pull request #14324 from owncloud/fix/14320

Check if instance is not yet installed
parents 610761d1 a666f804
No related branches found
No related tags found
No related merge requests found
...@@ -637,6 +637,7 @@ class OC { ...@@ -637,6 +637,7 @@ class OC {
// \OC\AppFramework\Http\Request::getOverwriteHost public // \OC\AppFramework\Http\Request::getOverwriteHost public
&& self::$server->getConfig()->getSystemValue('overwritehost') === '' && self::$server->getConfig()->getSystemValue('overwritehost') === ''
&& !\OC::$server->getTrustedDomainHelper()->isTrustedDomain($host) && !\OC::$server->getTrustedDomainHelper()->isTrustedDomain($host)
&& self::$server->getConfig()->getSystemValue('installed', false)
) { ) {
header('HTTP/1.1 400 Bad Request'); header('HTTP/1.1 400 Bad Request');
header('Status: 400 Bad Request'); header('Status: 400 Bad Request');
......
...@@ -164,7 +164,7 @@ class OC_Setup { ...@@ -164,7 +164,7 @@ class OC_Setup {
&& is_array($options['trusted_domains'])) { && is_array($options['trusted_domains'])) {
$trustedDomains = $options['trusted_domains']; $trustedDomains = $options['trusted_domains'];
} else { } else {
$trustedDomains = [\OCP\Util::getServerHostName()]; $trustedDomains = [$request->getInsecureServerHost()];
} }
if (OC_Util::runningOnWindows()) { if (OC_Util::runningOnWindows()) {
...@@ -187,7 +187,7 @@ class OC_Setup { ...@@ -187,7 +187,7 @@ class OC_Setup {
'secret' => $secret, 'secret' => $secret,
'trusted_domains' => $trustedDomains, 'trusted_domains' => $trustedDomains,
'datadirectory' => $dataDir, 'datadirectory' => $dataDir,
'overwrite.cli.url' => $request->getServerProtocol() . '://' . $request->getServerHost() . OC::$WEBROOT, 'overwrite.cli.url' => $request->getServerProtocol() . '://' . $request->getInsecureServerHost() . OC::$WEBROOT,
'dbtype' => $dbType, 'dbtype' => $dbType,
'version' => implode('.', OC_Util::getVersion()), 'version' => implode('.', OC_Util::getVersion()),
]); ]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment