summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-03-02 16:52:38 -0300
committerRenato Botelho <renato@netgate.com>2017-03-02 16:52:38 -0300
commitfc970ca2967ef4250925cd44a8dd0acee18078c0 (patch)
treeed7557836891506c5be5ab5ebc95157536902ca0 /src/usr/local/www/firewall_rules_edit.php
parent79215c03e3b34e180e64394bf00b4373127c6778 (diff)
parent680e15baef76a9c598d52d3f2b9ab498077336a8 (diff)
downloadpfsense-fc970ca2967ef4250925cd44a8dd0acee18078c0.zip
pfsense-fc970ca2967ef4250925cd44a8dd0acee18078c0.tar.gz
Merge pull request #3570 from phil-davis/fw-rule-desc-7294
Diffstat (limited to 'src/usr/local/www/firewall_rules_edit.php')
-rw-r--r--src/usr/local/www/firewall_rules_edit.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index 0212796..e30cb61 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -878,7 +878,8 @@ if ($_POST['save']) {
} else {
unset($filterent['log']);
}
- strncpy($filterent['descr'], $_POST['descr'], 52);
+
+ $filterent['descr'] = trim($_POST['descr']);
if ($_POST['gateway'] != "") {
$filterent['gateway'] = $_POST['gateway'];
@@ -1457,7 +1458,9 @@ $section->addInput(new Form_Input(
'Description',
'text',
$pconfig['descr']
-))->setHelp('A description may be entered here for administrative reference.');
+))->setHelp('A description may be entered here for administrative reference. ' .
+ 'A maximum of %s characters will be used in the ruleset and displayed in the firewall log.',
+ user_rule_descr_maxlen());
$btnadv = new Form_Button(
'btnadvopts',
OpenPOWER on IntegriCloud