1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-26 02:57:04 +00:00

Merge pull request #164 from hjjg/bugfix-roundcubekeylength

reads from /dev/random need to use count= to actually get that many bytes or else reads might be shorter
This commit is contained in:
Joshua Tauberer 2014-08-26 16:26:38 -04:00
commit 5c29275d8f
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ EOF
# Create an auto-configuration file to fill in database settings # Create an auto-configuration file to fill in database settings
# when the install script is run. Make an administrator account # when the install script is run. Make an administrator account
# here or else the install can't finish. # here or else the install can't finish.
adminpassword=$(dd if=/dev/random bs=40 count=1 2>/dev/null | sha1sum | fold -w 30 | head -n 1) adminpassword=$(dd if=/dev/random bs=1 count=40 2>/dev/null | sha1sum | fold -w 30 | head -n 1)
cat - > /usr/local/lib/owncloud/config/autoconfig.php <<EOF; cat - > /usr/local/lib/owncloud/config/autoconfig.php <<EOF;
<?php <?php
\$AUTOCONFIG = array ( \$AUTOCONFIG = array (

View File

@ -36,7 +36,7 @@ if [ ! -d /usr/local/lib/roundcubemail ]; then
fi fi
# Generate a safe 24-character secret key of safe characters. # Generate a safe 24-character secret key of safe characters.
SECRET_KEY=$(dd if=/dev/random bs=20 count=1 2>/dev/null | base64 | fold -w 24 | head -n 1) SECRET_KEY=$(dd if=/dev/random bs=1 count=18 2>/dev/null | base64 | fold -w 24 | head -n 1)
# Create a configuration file. # Create a configuration file.
# #