diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-01-05 23:18:33 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-01-05 23:18:33 +0000 |
commit | 3ed807e4f3f495a4680dfc4ff0724e28482105e5 (patch) | |
tree | 48976729c348b2f95afbd752c5a108eea855e1ce | |
parent | e2cf9497f3243a0fb71231b78b73019752bbc05a (diff) | |
download | pfsense-3ed807e4f3f495a4680dfc4ff0724e28482105e5.zip pfsense-3ed807e4f3f495a4680dfc4ff0724e28482105e5.tar.gz |
Move the stepsubmitphpaction out of the field collection. It was not setting the root password correctly.
-rwxr-xr-x | usr/local/www/wizard.php | 11 | ||||
-rw-r--r-- | usr/local/www/wizards/setup_wizard.xml | 34 |
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> |