1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 23:56:58 +02:00

Stronger passwords on default install, when methods available.

This commit is contained in:
Cameron
2016-06-07 17:18:18 -07:00
parent 3dbcf5e802
commit cb0621f5d7
3 changed files with 11 additions and 6 deletions

View File

@@ -1557,8 +1557,11 @@ if($this->pdo == true)
$this->logLine('Core prefs set to install choices');
// Create the admin user - replacing any that may be been included in the XML.
$us = e107::getUserSession();
$hash = $us->HashPassword($this->previous_steps['admin']['password'],$this->previous_steps['admin']['user'],PASSWORD_E107_PHP);
$ip = $_SERVER['REMOTE_ADDR'];
$userp = "1, '{$this->previous_steps['admin']['display']}', '{$this->previous_steps['admin']['user']}', '', '".md5($this->previous_steps['admin']['password'])."', '', '{$this->previous_steps['admin']['email']}', '', '', 0, ".time().", 0, 0, 0, 0, 0, '{$ip}', 0, '', 0, 1, '', '', '0', '', ".time().", ''";
$userp = "1, '{$this->previous_steps['admin']['display']}', '{$this->previous_steps['admin']['user']}', '', '".$hash."', '', '{$this->previous_steps['admin']['email']}', '', '', 0, ".time().", 0, 0, 0, 0, 0, '{$ip}', 0, '', 0, 1, '', '', '0', '', ".time().", ''";
$qry = "REPLACE INTO {$this->previous_steps['mysql']['prefix']}user VALUES ({$userp})";
$this->dbqry("REPLACE INTO {$this->previous_steps['mysql']['prefix']}user VALUES ({$userp})" );
$this->logLine('Admin user created');