diff --git a/actions/admin/settings/210.security.php b/actions/admin/settings/210.security.php index 704ae994..cf0712a8 100644 --- a/actions/admin/settings/210.security.php +++ b/actions/admin/settings/210.security.php @@ -53,7 +53,7 @@ return [ 'settinggroup' => 'system', 'varname' => 'passwordcryptfunc', 'type' => 'select', - 'default' => 0, + 'default' => PASSWORD_DEFAULT, 'option_options_method' => [ '\\Froxlor\\System\\Crypt', 'getAvailablePasswordHashes' diff --git a/index.php b/index.php index f8c60f63..715812cf 100644 --- a/index.php +++ b/index.php @@ -40,6 +40,7 @@ use Froxlor\UI\Panel\UI; use Froxlor\UI\Response; use Froxlor\User; use Froxlor\Validate\Validate; +use Froxlor\Language; if ($action == '') { $action = 'login'; @@ -119,6 +120,7 @@ if ($action == '2fa_entercode') { ]); exit(); } elseif ($action == 'login') { + $languages = Language::getLanguages(); if (isset($_POST['send']) && $_POST['send'] == 'send') { $loginname = Validate::validate($_POST['loginname'], 'loginname'); $password = Validate::validate($_POST['password'], 'password'); diff --git a/lib/Froxlor/System/Crypt.php b/lib/Froxlor/System/Crypt.php index 6ea9ab4a..3050d99a 100644 --- a/lib/Froxlor/System/Crypt.php +++ b/lib/Froxlor/System/Crypt.php @@ -94,13 +94,13 @@ class Crypt PASSWORD_DEFAULT => lng('serversettings.systemdefault') ]; if (defined('PASSWORD_BCRYPT')) { - $available_pwdhashes[PASSWORD_BCRYPT] = 'Bcrypt/Blowfish'; + $available_pwdhashes[PASSWORD_BCRYPT] = 'Bcrypt/Blowfish' . (PASSWORD_DEFAULT == PASSWORD_BCRYPT ? ' (' . lng('serversettings.systemdefault') . ')' : ''); } if (defined('PASSWORD_ARGON2I')) { - $available_pwdhashes[PASSWORD_ARGON2I] = 'Argon2i'; + $available_pwdhashes[PASSWORD_ARGON2I] = 'Argon2i' . (PASSWORD_DEFAULT == PASSWORD_ARGON2I ? ' (' . lng('serversettings.systemdefault') . ')' : ''); } if (defined('PASSWORD_ARGON2ID')) { - $available_pwdhashes[PASSWORD_ARGON2ID] = 'Argon2id'; + $available_pwdhashes[PASSWORD_ARGON2ID] = 'Argon2id' . (PASSWORD_DEFAULT == PASSWORD_ARGON2ID ? ' (' . lng('serversettings.systemdefault') . ')' : ''); } return $available_pwdhashes;