From 8100374ec15947e8f1b0f4d644b06c3a31382cf6 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 14 Nov 2016 00:02:40 +0545 Subject: 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). --- src/usr/local/www/firewall_rules_edit.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/usr/local/www/firewall_rules_edit.php') 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); -- cgit v1.1