X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/d98c495abf51c2581b2d8b1edfc09004f5defcde..1f29ee2fe4477d9f01a40cc519dded5621d5d452:/install.php diff --git a/install.php b/install.php index 78680f8..958aa1e 100644 --- a/install.php +++ b/install.php @@ -2,6 +2,7 @@ /* * Jirafeau, your web file repository * Copyright (C) 2008 Julien "axolotl" BERNARD + * Copyright (C) 2015 Nicola Spanti (RyDroid) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -14,7 +15,7 @@ * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ define ('JIRAFEAU_ROOT', dirname (__FILE__) . '/'); define ('NL', "\n"); @@ -67,9 +68,7 @@ jirafeau_export_cfg ($cfg) function jirafeau_mkdir ($path) { - if (!file_exists ($path) && !@mkdir ($path, 0755)) - return false; - return true; + return !(!file_exists ($path) && !@mkdir ($path, 0755)); } /** @@ -167,7 +166,7 @@ if (isset ($_POST['step']) && isset ($_POST['next'])) break; case 2: - $cfg['admin_password'] = $_POST['admin_password']; + $cfg['admin_password'] = hash('sha256', $_POST['admin_password']); jirafeau_export_cfg ($cfg); break; @@ -182,8 +181,6 @@ if (isset ($_POST['step']) && isset ($_POST['next'])) $cfg['var_root'] = jirafeau_add_ending_slash ($_POST['var_root']); jirafeau_export_cfg ($cfg); break; - - default: break; } }