mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Merge pull request #2006 from chuushi/patch-1
plugins/postfixadmin-change-password: Add "ARGON2I"
This commit is contained in:
commit
4ae9252c76
2 changed files with 5 additions and 1 deletions
|
|
@ -319,6 +319,10 @@ class ChangePasswordPostfixAdminDriver implements \RainLoop\Providers\ChangePass
|
|||
case 'sha512-crypt':
|
||||
$sResult = '{SHA512-CRYPT}' . crypt($sPassword,'$6$'.$sSalt);
|
||||
break;
|
||||
|
||||
case 'argon2i':
|
||||
$sResult = '{ARGON2I}' . password_hash($sPassword, PASSWORD_ARGON2I);
|
||||
break;
|
||||
|
||||
case 'mysql_encrypt':
|
||||
if($this->sEngine == 'MySQL'){
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class PostfixadminChangePasswordPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
->SetDefaultValue(''),
|
||||
\RainLoop\Plugins\Property::NewInstance('encrypt')->SetLabel('Encrypt')
|
||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::SELECTION)
|
||||
->SetDefaultValue(array('md5crypt', 'md5', 'system', 'cleartext', 'mysql_encrypt', 'SHA256-CRYPT', 'SHA512-CRYPT'))
|
||||
->SetDefaultValue(array('md5crypt', 'md5', 'system', 'cleartext', 'argon2i', 'mysql_encrypt', 'SHA256-CRYPT', 'SHA512-CRYPT'))
|
||||
->SetDescription('In what way do you want the passwords to be crypted ?'),
|
||||
\RainLoop\Plugins\Property::NewInstance('allowed_emails')->SetLabel('Allowed emails')
|
||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::STRING_TEXT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue