summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-11-14 00:02:40 +0545
committerPhil Davis <phil.davis@inf.org>2016-11-14 00:02:40 +0545
commit9444a281f051e11d5456cc37b2a3f56fc8a7bc33 (patch)
treeef6500fc4077628a9f77a7458ebedd9ff1bc7ef9 /src/usr/local/www/firewall_rules_edit.php
parentfbb652ed28641c50b14b9897a914ed317c323d73 (diff)
downloadpfsense-9444a281f051e11d5456cc37b2a3f56fc8a7bc33.zip
pfsense-9444a281f051e11d5456cc37b2a3f56fc8a7bc33.tar.gz
Fix #6918 Allow aliases with capital letters in rules
Expand the types of Form_IpAddress so that the caller can specify exactly what combination of IPv4, IPv6 address and alias is allowed for the field. Set the appropriate input pattern and hover help text. Only toLowercase() the entered value if it has a ":" in it - i.e. it looks like it is intended to be an IPv6 address (rather than an IPv4 or an alias name).
Diffstat (limited to 'src/usr/local/www/firewall_rules_edit.php')
-rw-r--r--src/usr/local/www/firewall_rules_edit.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index 038b383..1329dec 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -1317,8 +1317,9 @@ foreach (['src' => 'Source', 'dst' => 'Destination'] as $type => $name) {
$group->add(new Form_IpAddress(
$type,
$name .' Address',
- $pconfig[$type]
- ))->addMask($type .'mask', $pconfig[$type.'mask'])->setPattern('[a-zA-Z0-9_.:]+');
+ $pconfig[$type],
+ 'ALIASV4V6'
+ ))->addMask($type .'mask', $pconfig[$type.'mask']);
$section->add($group);
OpenPOWER on IntegriCloud