mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +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:
@@ -848,7 +848,7 @@ if (isset($_POST['add_user'])) {
|
||||
$password = password_hash($_POST['password'], PASSWORD_DEFAULT);
|
||||
|
||||
//Generate master encryption key
|
||||
$site_encryption_master_key = bin2hex(random_bytes(8));
|
||||
$site_encryption_master_key = randomString();
|
||||
|
||||
//Generate user specific key
|
||||
$user_specific_encryption_ciphertext = setupFirstUserSpecificKey($_POST['password'], $site_encryption_master_key);
|
||||
|
||||
Reference in New Issue
Block a user