Skip to content
Snippets Groups Projects
Commit 81ecbbb0 authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

trusted domains shall not be ignored on autosetup

parent 53ad15e0
No related branches found
No related tags found
No related merge requests found
......@@ -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()));
......
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