File tree Expand file tree Collapse file tree 4 files changed +11
-1
lines changed
Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 266266// this key is used to encrypt the users imap password which is stored
267267// in the session record (and the client cookie if remember password is enabled).
268268// please provide a string of exactly 24 chars.
269- $ rcmail_config ['des_key ' ] = 'vtIOjLZo9kffJoqzpSbm5r1r ' ;
269+ $ rcmail_config ['des_key ' ] = '%des_key% ' ;
270270
271271// Automatically add this domain to user names for login
272272// Only for IMAP servers that require full e-mail addresses for login
Original file line number Diff line number Diff line change @@ -1538,10 +1538,12 @@ if [ "$dovecot" = 'yes' ] && [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
15381538 chown www-data:adm /var/log/roundcube/errors
15391539
15401540 r=" $( gen_pass) "
1541+ rcDesKey=" $( openssl rand -base64 30 | tr -d " /" | cut -c1-24) "
15411542 mysql -e " CREATE DATABASE roundcube"
15421543 mysql -e " GRANT ALL ON roundcube.*
15431544 TO roundcube@localhost IDENTIFIED BY '$r '"
15441545 sed -i " s/%password%/$r /g" /etc/roundcube/debian-db-roundcube.php
1546+ sed -i " s/%des_key%/$rcDesKey /g" /etc/roundcube/config.inc.php
15451547 sed -i " s/localhost/$servername /g" /etc/roundcube/plugins/password/config.inc.php
15461548 mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
15471549
Original file line number Diff line number Diff line change @@ -1487,10 +1487,12 @@ if [ "$dovecot" = 'yes' ] && [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
14871487 chown www-data:adm /var/log/roundcube/errors
14881488
14891489 r=" $( gen_pass) "
1490+ rcDesKey=" $( openssl rand -base64 30 | tr -d " /" | cut -c1-24) "
14901491 mysql -e " CREATE DATABASE roundcube"
14911492 mysql -e " GRANT ALL ON roundcube.*
14921493 TO roundcube@localhost IDENTIFIED BY '$r '"
14931494 sed -i " s/%password%/$r /g" /etc/roundcube/debian-db-roundcube.php
1495+ sed -i " s/%des_key%/$rcDesKey /g" /etc/roundcube/config.inc.php
14941496 sed -i " s/localhost/$servername /g" /etc/roundcube/plugins/password/config.inc.php
14951497 mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
14961498
Original file line number Diff line number Diff line change @@ -113,3 +113,9 @@ if [ -z "$GZIP_LVL_CHECK" ]; then
113113 echo " (*) Updating backup compression level variable..."
114114 $BIN /v-change-sys-config-value " BACKUP_GZIP" ' 9'
115115fi
116+
117+ # Randomize Rouncube des_key for better security
118+ if [ -f " /etc/roundcube/config.inc.php" ]; then
119+ rcDesKey=" $( openssl rand -base64 30 | tr -d " /" | cut -c1-24) "
120+ sed -i " s/vtIOjLZo9kffJoqzpSbm5r1r/$rcDesKey /g" /etc/roundcube/config.inc.php
121+ fi
You can’t perform that action at this time.
0 commit comments