Store password as hash
Resolves T117
This commit is contained in:
parent
5e45579ef1
commit
fb937319db
2 changed files with 9 additions and 3 deletions
|
@ -23,8 +23,14 @@ if ($password == "") {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$options = [
|
||||||
|
'cost' => 12
|
||||||
|
];
|
||||||
|
|
||||||
|
$password = password_hash($password, PASSWORD_BCRYPT, $options);
|
||||||
|
|
||||||
$username = '$username = "' . $username . '";';
|
$username = '$username = "' . $username . '";';
|
||||||
$password = '$password = "' . $password . '";';
|
$password = '$password = \'' . $password . '\';';
|
||||||
|
|
||||||
$file = '<?php' . "\n" . $username . "\n" . $password . "\n";
|
$file = '<?php' . "\n" . $username . "\n" . $password . "\n";
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
$username = "example";
|
$username = "test";
|
||||||
$password = "example";
|
$password = '$2y$12$nHitKTwHqU4GmI3ADVE05eH/723fCNgdQ65kQ53FyZUVVB03BjfCO';
|
||||||
|
|
Reference in a new issue