Skip to content
Snippets Groups Projects
Commit 4c5292cb authored by Jared Hancock's avatar Jared Hancock
Browse files

install: Fix code include() crash

parent edefc01b
Branches
Tags
No related merge requests found
...@@ -191,14 +191,13 @@ class Bootstrap { ...@@ -191,14 +191,13 @@ class Bootstrap {
#include required files #include required files
require_once INCLUDE_DIR.'class.util.php'; require_once INCLUDE_DIR.'class.util.php';
require_once INCLUDE_DIR.'class.translation.php'; require_once INCLUDE_DIR.'class.translation.php';
require(INCLUDE_DIR.'class.signal.php'); require_once(INCLUDE_DIR.'class.signal.php');
require(INCLUDE_DIR.'class.model.php'); require(INCLUDE_DIR.'class.model.php');
require(INCLUDE_DIR.'class.user.php'); require(INCLUDE_DIR.'class.user.php');
require(INCLUDE_DIR.'class.auth.php'); require(INCLUDE_DIR.'class.auth.php');
require(INCLUDE_DIR.'class.pagenate.php'); //Pagenate helper! require(INCLUDE_DIR.'class.pagenate.php'); //Pagenate helper!
require(INCLUDE_DIR.'class.log.php'); require(INCLUDE_DIR.'class.log.php');
require(INCLUDE_DIR.'class.crypto.php'); require(INCLUDE_DIR.'class.crypto.php');
require_once(INCLUDE_DIR.'class.signal.php');
require(INCLUDE_DIR.'class.page.php'); require(INCLUDE_DIR.'class.page.php');
require_once(INCLUDE_DIR.'class.format.php'); //format helpers require_once(INCLUDE_DIR.'class.format.php'); //format helpers
require_once(INCLUDE_DIR.'class.validator.php'); //Class to help with basic form input validation...please help improve it. require_once(INCLUDE_DIR.'class.validator.php'); //Class to help with basic form input validation...please help improve it.
......
...@@ -3427,8 +3427,6 @@ class DatetimePickerWidget extends Widget { ...@@ -3427,8 +3427,6 @@ class DatetimePickerWidget extends Widget {
// TODO: Add time picker -- requires time picker or selection with // TODO: Add time picker -- requires time picker or selection with
// Misc::timeDropdown // Misc::timeDropdown
echo ' ' . Misc::timeDropdown($hr, $min, $this->name . ':time'); echo ' ' . Misc::timeDropdown($hr, $min, $this->name . ':time');
echo '</div>';
} }
/** /**
......
...@@ -73,13 +73,6 @@ class Installer extends SetupWizard { ...@@ -73,13 +73,6 @@ class Installer extends SetupWizard {
//Admin's pass confirmation. //Admin's pass confirmation.
if(!$this->errors && strcasecmp($vars['passwd'],$vars['passwd2'])) if(!$this->errors && strcasecmp($vars['passwd'],$vars['passwd2']))
$this->errors['passwd2']=__('Password(s) do not match'); $this->errors['passwd2']=__('Password(s) do not match');
try {
require_once INCLUDE_DIR.'class.auth.php';
PasswordPolicy::checkPassword($vars['passwd'], null);
}
catch (BadPassword $e) {
$this->errors['passwd'] = $e->getMessage();
}
//Check table prefix underscore required at the end! //Check table prefix underscore required at the end!
if($vars['prefix'] && substr($vars['prefix'], -1)!='_') if($vars['prefix'] && substr($vars['prefix'], -1)!='_')
...@@ -118,16 +111,25 @@ class Installer extends SetupWizard { ...@@ -118,16 +111,25 @@ class Installer extends SetupWizard {
} }
} }
// bailout on errors.
if ($this->errors)
return false;
/*************** We're ready to install ************************/ /*************** We're ready to install ************************/
define('ADMIN_EMAIL',$vars['admin_email']); //Needed to report SQL errors during install. define('ADMIN_EMAIL',$vars['admin_email']); //Needed to report SQL errors during install.
define('TABLE_PREFIX',$vars['prefix']); //Table prefix define('TABLE_PREFIX',$vars['prefix']); //Table prefix
Bootstrap::defineTables(TABLE_PREFIX); Bootstrap::defineTables(TABLE_PREFIX);
Bootstrap::loadCode(); Bootstrap::loadCode();
// Check password against password policy (after loading code)
try {
PasswordPolicy::checkPassword($vars['passwd'], null);
}
catch (BadPassword $e) {
$this->errors['passwd'] = $e->getMessage();
}
// bailout on errors.
if ($this->errors)
return false;
$debug = true; // Change it to false to squelch SQL errors. $debug = true; // Change it to false to squelch SQL errors.
//Last minute checks. //Last minute checks.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment