diff options
author | Romain d'Alverny <rdalverny@gmail.com> | 2022-01-12 19:42:35 +0100 |
---|---|---|
committer | Romain d'Alverny <rdalverny@gmail.com> | 2022-01-12 19:42:35 +0100 |
commit | ef25d22544d4df97eae819217d841a7a3147c41d (patch) | |
tree | 205fa5dae346a2cc573a6b102fc99a2af822b865 /install.php | |
parent | 0b2f80b2504286f0f9b9e1b95db5244d414a6808 (diff) | |
download | planet-ef25d22544d4df97eae819217d841a7a3147c41d.tar planet-ef25d22544d4df97eae819217d841a7a3147c41d.tar.gz planet-ef25d22544d4df97eae819217d841a7a3147c41d.tar.bz2 planet-ef25d22544d4df97eae819217d841a7a3147c41d.tar.xz planet-ef25d22544d4df97eae819217d841a7a3147c41d.zip |
Use sha256 for password hashing
See moonmoon/moonmoon#10
Diffstat (limited to 'install.php')
-rwxr-xr-x | install.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/install.php b/install.php index 75166a3..5aaaef9 100755 --- a/install.php +++ b/install.php @@ -33,7 +33,10 @@ if ($PlanetConfig::isInstalled()) { OpmlManager::save(new Opml(), custom_path('people.opml')); //Save password - $save['password'] = file_put_contents(admin_path('inc/pwd.inc.php'), '<?php $login="admin"; $password="'.md5($_POST['password']).'"; ?>'); + $save['password'] = file_put_contents( + admin_path('inc/pwd.inc.php'), + sprintf('<?php $login="admin"; $password="%s"; ?>', hash('sha256', $_POST['password'])) + ); if (0 != ($save['config'] + $save['password'])) { $status = 'installed'; |