X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/d98c495abf51c2581b2d8b1edfc09004f5defcde..91938ace0f73ee6bdfbc44956cd2e1652c9c8297:/install.php?ds=sidebyside diff --git a/install.php b/install.php index 78680f8..ae4bd99 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; } } @@ -235,7 +232,7 @@ default: "" />