Skip to content

Commit

Permalink
align max username length, ref https://github.com/opnsense/src/blob/4…
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis committed Feb 26, 2017
1 parent 2cf06c6 commit 0829a34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/www/system_usermanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ function get_user_privdesc(& $user)
$input_errors[] = gettext("The username contains invalid characters.");
}

if (strlen($_POST['usernamefld']) > 16) {
$input_errors[] = gettext("The username is longer than 16 characters.");
if (strlen($_POST['usernamefld']) > 32) {
$input_errors[] = gettext("The username is longer than 32 characters.");
}

if (!empty($pconfig['passwordfld1'])) {
Expand Down Expand Up @@ -561,7 +561,7 @@ function get_user_privdesc(& $user)
<tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Username");?></td>
<td>
<input name="usernamefld" type="text" class="formfld user" id="usernamefld" size="20" maxlength="16" value="<?=$pconfig['usernamefld'];?>" <?= $pconfig['scope'] == "system" || !empty($pconfig['user_dn']) ? "readonly=\"readonly\"" : "";?> />
<input name="usernamefld" type="text" class="formfld user" id="usernamefld" size="20" maxlength="32" value="<?=$pconfig['usernamefld'];?>" <?= $pconfig['scope'] == "system" || !empty($pconfig['user_dn']) ? "readonly=\"readonly\"" : "";?> />
<input name="oldusername" type="hidden" id="oldusername" value="<?=$pconfig['usernamefld'];?>" />
</td>
</tr>
Expand All @@ -570,7 +570,7 @@ function get_user_privdesc(& $user)
<tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("User distinguished name");?></td>
<td>
<input name="user_dn" type="text" class="formfld user" id="user_dn" size="20" maxlength="16" value="<?=$pconfig['user_dn'];?>"/ readonly>
<input name="user_dn" type="text" class="formfld user" id="user_dn" size="20" value="<?=$pconfig['user_dn'];?>"/ readonly>
</td>
</tr>
<?php
Expand Down

0 comments on commit 0829a34

Please sign in to comment.