Generate longer more secure Key for logins

This commit is contained in:
johnnyq
2022-12-29 18:23:11 -05:00
parent 5d6b03141b
commit 29a9d6ef8f
6 changed files with 19 additions and 14 deletions

View File

@@ -66,7 +66,7 @@ if(isset($_POST['login'])){
$_SESSION['user_id'] = $row['user_id'];
$_SESSION['user_name'] = $row['user_name'];
$_SESSION['user_role'] = $row['user_role'];
$_SESSION['csrf_token'] = keygen();
$_SESSION['csrf_token'] = bin2hex(random_bytes(78));
// Setup encryption session key
if (isset($row['user_specific_encryption_ciphertext']) && $row['user_role'] > 1) {