Skip to content

Commit

Permalink
wizard: fix root password input
Browse files Browse the repository at this point in the history
Unfortunately, <name/> generates the name from a label
into the form name= and id= attributes, which can utterly
break if the name is changed when there is custom code.
  • Loading branch information
fichtner committed Aug 6, 2018
1 parent a710ff5 commit abf1e44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wizard/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,10 @@ if (!empty(trim($_POST['lanipaddress']))) {
</field>
</fields>
<stepsubmitphpaction><![CDATA[
if (!empty($_POST['adminpassword']) || !empty($_POST['adminpasswordagain'])) {
if ($_POST['adminpassword'] == $_POST['adminpasswordagain']) {
if (!empty($_POST['rootpassword']) || !empty($_POST['rootpasswordconfirmation'])) {
if ($_POST['rootpassword'] == $_POST['rootpasswordconfirmation']) {
$admin_user = &getUserEntryByUID(0);
local_user_set_password($admin_user, $_POST['adminpassword']);
local_user_set_password($admin_user, $_POST['rootpassword']);
local_user_set($admin_user);
} else {
$input_errors[] = gettext('The passwords do not match.');
Expand Down

0 comments on commit abf1e44

Please sign in to comment.