diff --git a/app/bin/config.php b/app/bin/config.php index 0a77952..7407859 100644 --- a/app/bin/config.php +++ b/app/bin/config.php @@ -21,7 +21,7 @@ Config::register("main", "db_pages", "pages.sqlite"); Config::register("admin", "admin_username", "admin"); - Config::register("admin", "admin_password", '$1$VGthOaJJ$o7GR6b657c7mtrOCTLZgO.'); + Config::register("admin", "admin_password", "admin"); Config::register("admin", "uglify_service", "http://uglify.makesit.es/"); diff --git a/app/models/Config.php b/app/models/Config.php index a1fb31e..bbcaa3e 100644 --- a/app/models/Config.php +++ b/app/models/Config.php @@ -31,6 +31,8 @@ static function register($table, $key, $value="") { // we already know the key doesn't exist - just create it $config = new Config(0, $table); $config->set('key', "$key"); + // FIX: special case for admin password (use cipher) + $value = ( $key == "admin_password" ) ? crypt($value, CIPHER) : $value; $config->set('value', "$value"); $config->create(); // save in the global object