summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-01-05 23:18:33 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-01-05 23:18:33 +0000
commit3ed807e4f3f495a4680dfc4ff0724e28482105e5 (patch)
tree48976729c348b2f95afbd752c5a108eea855e1ce
parente2cf9497f3243a0fb71231b78b73019752bbc05a (diff)
downloadpfsense-3ed807e4f3f495a4680dfc4ff0724e28482105e5.zip
pfsense-3ed807e4f3f495a4680dfc4ff0724e28482105e5.tar.gz
Move the stepsubmitphpaction out of the field collection. It was not setting the root password correctly.
-rwxr-xr-xusr/local/www/wizard.php11
-rw-r--r--usr/local/www/wizards/setup_wizard.xml34
2 files changed, 23 insertions, 22 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index b908b26..86306b5 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -73,12 +73,13 @@ if ($_POST) {
if($field['bindstofield'])
update_config_field( $field['bindstofield'], $_POST[$fieldname], $unset_fields, $arraynum);
}
- // run custom php code embedded in xml config.
- if($pkg['step'][$stepid]['stepsubmitphpaction']) {
- eval($pkg['step'][$stepid]['stepsubmitphpaction']);
- }
- write_config();
+
}
+ // run custom php code embedded in xml config.
+ if($pkg['step'][$stepid]['stepsubmitphpaction'] <> "") {
+ eval($pkg['step'][$stepid]['stepsubmitphpaction']);
+ }
+ write_config();
$stepid++;
if($stepid > $totalsteps) $stepid = $totalsteps;
}
diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml
index 94f5d0f..8197b36 100644
--- a/usr/local/www/wizards/setup_wizard.xml
+++ b/usr/local/www/wizards/setup_wizard.xml
@@ -2435,29 +2435,29 @@
<field>
<name>Admin Password AGAIN</name>
<type>password</type>
- <stepsubmitphpaction>
- if($_POST['adminpassword'] != "") {
- if($_POST['adminpassword'] == $_POST['adminpasswordagain']) {
- $fd = popen("/usr/sbin/pw usermod -n root -H 0", "w");
- $salt = md5(time());
- $crypted_pw = crypt($_POST['adminpassword'],$salt);
- fwrite($fd, $crypted_pw);
- pclose($fd);
- $config['system']['password'] = crypt($_POST['adminpassword']);
- write_config();
- system_password_configure();
- } else {
- print_info_box_np("Passwords do not match! Please press back in your browser window and correct.");
- die;
- }
- }
- </stepsubmitphpaction>
</field>
<field>
<name>Next</name>
<type>submit</type>
</field>
</fields>
+ <stepsubmitphpaction>
+ if($_POST['adminpassword'] != "") {
+ if($_POST['adminpassword'] == $_POST['adminpasswordagain']) {
+ $fd = popen("/usr/sbin/pw usermod -n root -H 0", "w");
+ $salt = md5(time());
+ $crypted_pw = crypt($_POST['adminpassword'],$salt);
+ fwrite($fd, $crypted_pw);
+ pclose($fd);
+ $config['system']['password'] = crypt($_POST['adminpassword']);
+ write_config();
+ system_password_configure();
+ } else {
+ print_info_box_np("Passwords do not match! Please press back in your browser window and correct.");
+ die;
+ }
+ }
+ </stepsubmitphpaction>
</step>
<step>
<id>7</id>
OpenPOWER on IntegriCloud