summaryrefslogtreecommitdiffstats
path: root/lib/private/setup.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-06-17 22:58:08 +0200
committerArthur Schiwon <blizzz@owncloud.com>2014-06-23 10:33:15 +0200
commit81ecbbb0614ecfe9953d813f92424f299a1e2834 (patch)
tree19c88a66b9ac832757118e498836a46a30d81b8b /lib/private/setup.php
parent53ad15e0e3b60c316dc057266a830f39e79415f1 (diff)
downloadnextcloud-server-81ecbbb0614ecfe9953d813f92424f299a1e2834.tar.gz
nextcloud-server-81ecbbb0614ecfe9953d813f92424f299a1e2834.zip
trusted domains shall not be ignored on autosetup
Diffstat (limited to 'lib/private/setup.php')
-rw-r--r--lib/private/setup.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/setup.php b/lib/private/setup.php
index 7a08816c4b1..fdf98ab0959 100644
--- a/lib/private/setup.php
+++ b/lib/private/setup.php
@@ -50,6 +50,12 @@ class OC_Setup {
$username = htmlspecialchars_decode($options['adminlogin']);
$password = htmlspecialchars_decode($options['adminpass']);
$datadir = htmlspecialchars_decode($options['directory']);
+ if( isset($options['trusted_domains'])
+ && is_array($options['trusted_domains'])) {
+ $trustedDomains = $options['trusted_domains'];
+ } else {
+ $trustedDomains = array(OC_Request::serverHost());
+ }
if (OC_Util::runningOnWindows()) {
$datadir = rtrim(realpath($datadir), '\\');
@@ -65,7 +71,7 @@ class OC_Setup {
OC_Config::setValue('passwordsalt', $salt);
//write the config file
- OC_Config::setValue('trusted_domains', array(OC_Request::serverHost()));
+ OC_Config::setValue('trusted_domains', $trustedDomains);
OC_Config::setValue('datadirectory', $datadir);
OC_Config::setValue('dbtype', $dbtype);
OC_Config::setValue('version', implode('.', OC_Util::getVersion()));