You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update postfixadmin 3.3.4, update alpine:3.13 and php8 (#9)
* update to alpine:3.13 and php8
* update postfixadmin to 3.3.4
* install new dependency: php8-pdo, php8-pdo_pgsql and php8-pdo_mysql
* temporary workaround for doveadm pw reading server.key.
See also postfixadmin/postfixadmin#398.
* run upgrade.php at start
* Update HASH lenght check. The HASH generated by setup.php is now 60 characters long.
PostfixAdmin is a web based interface used to manage mailboxes, virtual domains and aliases. It also features support for vacation/out-of-the-office messages.
Copy file name to clipboardExpand all lines: bin/setup
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,17 @@ CGREEN="${CSI}1;32m"
7
7
8
8
read -rp "> Postfixadmin setup hash : " HASH
9
9
10
-
# MD5(salt) : SHA1( MD5(salt) : PASSWORD );
11
-
# 32 1 40
12
-
# Exemple : ffdeb741c58db80d060ddb170af4623a:54e0ac9a55d69c5e53d214c7ad7f1e3df40a3caa
13
-
while [ ${#HASH}-ne 73 ];do
10
+
# postfixadmin uses the function password_hash with PASSWORD_DEFAULT since version 3.3.0.
11
+
# password_hash() creates a new password hash using a strong one-way hashing algorithm.
12
+
# PASSWORD_DEFAULT - Use the bcrypt algorithm (default as of PHP 5.5.0). Note that this constant is designed to change over time as new and stronger algorithms are added to PHP.
13
+
# PASSWORD_BCRYPT - Use the CRYPT_BLOWFISH algorithm to create the hash. This will produce a standard crypt() compatible hash using the "$2y$" identifier. The result will always be a 60 character string, or false on failure.
14
+
# See also: https://www.php.net/manual/en/function.password-hash.php
15
+
while [ ${#HASH}-ne 60 ];do
14
16
echo -e "${CRED}\n/!\ Invalid HASH !${CEND}"1>&2
15
17
read -rp "> Postfixadmin setup hash : " HASH
16
18
echo""
17
19
done
18
20
19
21
sed -i "s|\($CONF\['setup_password'\].*=\).*|\1 '${HASH}';|" /postfixadmin/config.inc.php
0 commit comments