www/nginx: move to password_hash() as suggested by @dabo-devconsole; closes #3063

This commit is contained in:
Franco Fichtner
2022-08-02 08:35:57 +02:00
parent 2d34da4a1f
commit c2184c76a4
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ Plugin Changelog
* rfc5746, rfc7507 and rfc8701 are taken into account on compiling and comparing tls fingerprints
* the reason for scoring the connection as intercepted is added to the X-TLS-Client-Intercepted header. check backend settings if using this feature
* http_post hook added to be able to map global variables
* PHP 8 compatibility for crypt() call
* PHP 8 compatibility: change crypt() to password_hash()
1.28
@@ -228,7 +228,7 @@ foreach ($nginx->userlist->iterateItems() as $user_list) {
foreach ($users as $user) {
$user_node = $nginx->getNodeByReference("credential." . $user);
$username = (string)$user_node->username;
$password = crypt((string)$user_node->password, '$6$');
$password = password_hash((string)$user_node->password, PASSWORD_DEFAULT);
fwrite($file, $username . ':' . $password . "\n");
}
} finally {