mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Disallow installing Rhymix with the DB root account
This commit is contained in:
parent
9ba8c9159e
commit
2de3bbcea7
3 changed files with 8 additions and 0 deletions
|
|
@ -32,6 +32,12 @@ class installController extends install
|
|||
// Get DB config variables.
|
||||
$config = Context::gets('db_type', 'db_host', 'db_port', 'db_user', 'db_pass', 'db_database', 'db_prefix');
|
||||
|
||||
// Disallow installation using the root account.
|
||||
if (trim($config->db_user) === 'root')
|
||||
{
|
||||
return new BaseObject(-1, 'msg_dbroot_disallowed');
|
||||
}
|
||||
|
||||
// Create a temporary setting object.
|
||||
Rhymix\Framework\Config::set('db.master', array(
|
||||
'type' => $config->db_type,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue