Skip to content

Commit

Permalink
⚡ default password encoded using cipher
Browse files Browse the repository at this point in the history
  • Loading branch information
tracend committed Sep 29, 2015
1 parent 93cd658 commit f196c13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/bin/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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/");

Expand Down
2 changes: 2 additions & 0 deletions app/models/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f196c13

Please sign in to comment.