Store password as hash

Resolves T117
This commit is contained in:
Marcel Kapfer (mmk2410) 2016-05-17 22:37:36 +02:00
parent 5e45579ef1
commit fb937319db
2 changed files with 9 additions and 3 deletions

View file

@ -23,8 +23,14 @@ if ($password == "") {
exit();
}
$options = [
'cost' => 12
];
$password = password_hash($password, PASSWORD_BCRYPT, $options);
$username = '$username = "' . $username . '";';
$password = '$password = "' . $password . '";';
$password = '$password = \'' . $password . '\';';
$file = '<?php' . "\n" . $username . "\n" . $password . "\n";

View file

@ -1,3 +1,3 @@
<?php
$username = "example";
$password = "example";
$username = "test";
$password = '$2y$12$nHitKTwHqU4GmI3ADVE05eH/723fCNgdQ65kQ53FyZUVVB03BjfCO';