File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1538,9 +1538,11 @@ 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 '"
1545+ sed -i " s/vtIOjLZo9kffJoqzpSbm5r1r/$rcDesKey /g" /etc/roundcube/config.inc.php
15441546 sed -i " s/%password%/$r /g" /etc/roundcube/debian-db-roundcube.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
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/vtIOjLZo9kffJoqzpSbm5r1r/$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