Credential vault: each agent's and API key's copy of the master key is sealed with AES-256-GCM under a 600,000 round PBKDF2-SHA256 key with its full 256 bits instead of a 64 bit key, old copies still read and moved to the new format at the next sign-in or API call, Admin > Backup lists the copies still in the old format with a button to retire them; sign-in no longer keeps the plain master key in the session between the password and two-step steps, which also fixes the vault being closed after a mistyped two-step code; 26.12.2 changelog entries

This commit is contained in:
johnnyq
2026-11-27 14:17:06 -05:00
parent 370b80a67b
commit eed334aaa4
7 changed files with 222 additions and 80 deletions

View File

@@ -221,7 +221,9 @@ function userPasswordProblem($password) {
function userSetPassword($user_id, $password) {
global $mysqli;
$hash = password_hash((string) $password, PASSWORD_DEFAULT);
$ciphertext = escapeSql(encryptUserSpecificKey((string) $password));
// No copy when this session's vault doesn't open (a reset from the sign-in page) - an admin resetting it later gives them one
$ciphertext = encryptUserSpecificKey((string) $password);
$ciphertext = escapeSql($ciphertext === false ? '' : $ciphertext);
mysqli_query($mysqli, "UPDATE users SET user_password = '" . escapeSql($hash) . "', user_specific_encryption_ciphertext = '$ciphertext' WHERE user_id = " . intval($user_id));
userSessionRestamp($user_id, $hash);
}