added salt for crypt

This commit is contained in:
Roland Gruber 2018-07-31 19:10:42 +02:00
parent d37bd1db71
commit c2cae621e7
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ function pwd_hash($password, $enabled = true, $hashType = 'SSHA') {
$hash = "";
switch ($hashType) {
case 'CRYPT':
$hash = "{CRYPT}" . crypt($password);
$hash = "{CRYPT}" . crypt($password, generateSalt(2));
break;
case 'CRYPT-SHA512':
$hash = "{CRYPT}" . crypt($password, '$6$' . generateSalt(16));