Add a pattern to prevent invalid username characters

pull/3456/head
Isaac Connor 2022-03-10 14:10:31 -05:00
parent 07aa171c04
commit 550693af10
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@
$selfEdit = ZM_USER_SELF_EDIT && ($_REQUEST['uid'] == $user['Id']);
if ( !canEdit('System') && !$selfEdit ) {
if (!canEdit('System') && !$selfEdit) {
$view = 'error';
return;
}
@ -80,7 +80,7 @@ if ( canEdit('System') ) {
?>
<tr>
<th class="text-right" scope="row"><?php echo translate('Username') ?></th>
<td><input type="text" name="newUser[Username]" value="<?php echo validHtmlStr($newUser->Username()); ?>"<?php echo $newUser->Username() == 'admin' ? ' readonly="readonly"':''?>/></td>
<td><input type="text" name="newUser[Username]" pattern="[A-Za-z0-9 .@]+" value="<?php echo validHtmlStr($newUser->Username()); ?>"<?php echo $newUser->Username() == 'admin' ? ' readonly="readonly"':''?>/></td>
</tr>
<?php
}