summaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-07-12 09:45:22 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-07-12 09:45:22 +0200
commit77effa68365a52050854d5df427a5a80bde1030e (patch)
treeb5002a018383622a6893e6366814e8c07ba18650 /installer
parent7c68484b23ccb3823a6aa2cec4c2841838bd389a (diff)
Fix some properties when creating new config files
Diffstat (limited to 'installer')
-rw-r--r--installer/rcube_install.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/installer/rcube_install.php b/installer/rcube_install.php
index 600db34ab..0f1bfe23e 100644
--- a/installer/rcube_install.php
+++ b/installer/rcube_install.php
@@ -181,9 +181,18 @@ class rcube_install
$is_default = !isset($_POST["_$prop"]);
$value = !$is_default || $this->bool_config_props[$prop] ? $_POST["_$prop"] : $default;
+ // always disable installer
if ($prop == 'enable_installer')
$value = false;
+ // reset useragent to default (keeps version up-to-date)
+ if ($prop == 'useragent' && stripos($value, 'Roundcube Webmail/') !== false)
+ $value = $this->defaults[$prop];
+
+ // generate new encryption key, never use the default value
+ if ($prop == 'des_key' && $value == $this->defaults[$prop])
+ $value = $this->random_key(24);
+
// convert some form data
if ($prop == 'debug_level' && !$is_default) {
if (is_array($value)) {