mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
- Create custom function (randomString()) for generating cryptographically (and URL) safe strings.
- Replace usages of keygen and bin2hex(random_bytes()) with this function.
This commit is contained in:
@@ -117,7 +117,7 @@ if (isset($_POST['login'])) {
|
||||
$_SESSION['user_id'] = $user_id;
|
||||
$_SESSION['user_name'] = $user_name;
|
||||
$_SESSION['user_role'] = $row['user_role'];
|
||||
$_SESSION['csrf_token'] = bin2hex(random_bytes(78));
|
||||
$_SESSION['csrf_token'] = randomString(156);
|
||||
$_SESSION['logged'] = TRUE;
|
||||
|
||||
// Setup encryption session key
|
||||
|
||||
Reference in New Issue
Block a user