Skip to content

Commit

Permalink
add caution for unchanged default admin password
Browse files Browse the repository at this point in the history
  • Loading branch information
yllumi committed Nov 26, 2014
1 parent 63c55a3 commit 80949e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sites/default/users/admin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"username": "admin",
"password": "password",
"passconf": "password"
"username": "admin",
"password": "password",
"passconf": "password"
}
6 changes: 6 additions & 0 deletions system/application/core/Admin_Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ public function __construct()

// set theme
$this->template->set_theme($this->config->item('admin_theme'));

if(file_exists('sites/'.SITE_SLUG.'/users/admin.json')){
$admin = json_decode(file_get_contents('sites/'.SITE_SLUG.'/users/admin.json'), true);
if(isset($admin['password']) && $admin['password'] == 'password')
$this->template->set('warning', 'Change your default admin password to secure one in <a href="'.site_url('panel/users/edit/admin').'"><strong>Users settings</strong></a> page first.');
}
}

}

0 comments on commit 80949e8

Please sign in to comment.