summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-02-22 20:53:19 +0545
committerRenato Botelho <renato@netgate.com>2017-03-02 16:53:40 -0300
commit956b03cd0d16ea0b24eb5228c95c665f8efad138 (patch)
tree112eeaaf5106ba7b93fce4d3939eddc8ac4e4cca /src/usr/local/www/firewall_rules_edit.php
parente850b0a3c7b273e43ae1d3eada7e034c628c7d1c (diff)
downloadpfsense-956b03cd0d16ea0b24eb5228c95c665f8efad138.zip
pfsense-956b03cd0d16ea0b24eb5228c95c665f8efad138.tar.gz
Fix 7294 keep full rule description
Signed-off-by: Phil Davis <phil.davis@inf.org> (cherry picked from commit 680e15baef76a9c598d52d3f2b9ab498077336a8)
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 eef7ff0..610d1a0 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -917,7 +917,8 @@ if ($_POST) {
} else {
unset($filterent['log']);
}
- strncpy($filterent['descr'], $_POST['descr'], 52);
+
+ $filterent['descr'] = trim($_POST['descr']);
if ($_POST['gateway'] != "") {
$filterent['gateway'] = $_POST['gateway'];
@@ -1497,7 +1498,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