summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_groupmanager.php
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2013-06-22 00:40:01 +0200
committerPiBa-NL <pba_2k3@yahoo.com>2013-06-22 00:40:01 +0200
commit3db408b30388f1bade99c65629bbe74310e69de4 (patch)
treebffb40069ecf907c18961b3e8517a84f9c71a2a7 /usr/local/www/system_groupmanager.php
parenta80cb9ca40fb5b485d03d7b64a3fd99a7a15b880 (diff)
downloadpfsense-3db408b30388f1bade99c65629bbe74310e69de4.zip
pfsense-3db408b30388f1bade99c65629bbe74310e69de4.tar.gz
System: Group manager, set max length for groupname to 16 characters
Diffstat (limited to 'usr/local/www/system_groupmanager.php')
-rw-r--r--usr/local/www/system_groupmanager.php7
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>
OpenPOWER on IntegriCloud