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
committerjim-p <jimp@pfsense.org>2016-11-14 18:00:01 -0500
commit8100374ec15947e8f1b0f4d644b06c3a31382cf6 (patch)
tree5195832300a4f5d751c13cdbe750d32aa753e483 /src/usr/local/www/firewall_rules_edit.php
parent2909468c57917a5b3bdea1901580c0b2a9b99c0d (diff)
downloadpfsense-8100374ec15947e8f1b0f4d644b06c3a31382cf6.zip
pfsense-8100374ec15947e8f1b0f4d644b06c3a31382cf6.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 cbadfd8..92f1f53 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -1354,8 +1354,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