diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2013-06-22 00:40:01 +0200 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-06-22 11:01:46 +0000 |
commit | 63b69d3427d893736171292e347eb571c819b8a5 (patch) | |
tree | ab6c32586b13b2c9dafe0177b7454d3b0f696e18 /usr/local | |
parent | 51f1fc586f9be424ebe04348eff1572310bce640 (diff) | |
download | pfsense-63b69d3427d893736171292e347eb571c819b8a5.zip pfsense-63b69d3427d893736171292e347eb571c819b8a5.tar.gz |
System: Group manager, set max length for groupname to 16 characters
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/system_groupmanager.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/local/www/system_groupmanager.php b/usr/local/www/system_groupmanager.php index ed2cd31..27cd2f2 100644 --- a/usr/local/www/system_groupmanager.php +++ b/usr/local/www/system_groupmanager.php @@ -120,7 +120,10 @@ if ($_POST) { if (preg_match("/[^a-zA-Z0-9\.\-_ ]/", $_POST['groupname'])) $input_errors[] = gettext("The group name contains invalid characters."); - + + if (strlen($_POST['groupname']) > 16) + $input_errors[] = gettext("The group name is longer than 16 characters."); + if (!$input_errors && !(isset($id) && $a_group[$id])) { /* make sure there are no dupes */ foreach ($a_group as $group) { @@ -268,7 +271,7 @@ function presubmit() { <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Group name");?></td> <td width="78%" class="vtable"> - <input name="groupname" type="text" class="formfld group" id="groupname" size="20" value="<?=htmlspecialchars($pconfig['name']);?>" <?=$ro;?> /> + <input name="groupname" type="text" class="formfld group" id="groupname" size="20" maxlength="16" value="<?=htmlspecialchars($pconfig['name']);?>" <?=$ro;?> /> </td> </tr> <tr> |