$config_account_salt -> USE_ACCOUNT_SALT

This commit is contained in:
slawkens
2023-02-07 10:48:29 +01:00
parent d0c479d11d
commit b82c021ff7
13 changed files with 20 additions and 26 deletions

View File

@@ -127,8 +127,7 @@ switch ($action) {
$account->find($inputAccountName);
}
$config_salt_enabled = fieldExist('salt', 'accounts');
$current_password = encrypt(($config_salt_enabled ? $account->getCustomField('salt') : '') . $request->password);
$current_password = encrypt((USE_ACCOUNT_SALT ? $account->getCustomField('salt') : '') . $request->password);
if (!$account->isLoaded() || $account->getPassword() != $current_password) {
sendError(($inputEmail != false ? 'Email' : 'Account name') . ' or password is not correct.');