diff options
author | Phil Davis <phil.davis@inf.org> | 2016-05-06 11:35:51 +0930 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-05-05 23:29:40 -0500 |
commit | aeb81f5b2036cd74d3178207354c8a548c3798e7 (patch) | |
tree | a3fb75e8a3acdc279958a455818ffa80b128d39f /src/usr | |
parent | f8e730bb0098a3ee266b6eaae51812cbe846299f (diff) | |
download | pfsense-aeb81f5b2036cd74d3178207354c8a548c3798e7.zip pfsense-aeb81f5b2036cd74d3178207354c8a548c3798e7.tar.gz |
Fix #6322 Allow expanded forms of alias entry
Forum: https://forum.pfsense.org/index.php?topic=111361.0
Diffstat (limited to 'src/usr')
-rwxr-xr-x | src/usr/local/www/firewall_aliases_edit.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php index bacad61..90b84eb 100755 --- a/src/usr/local/www/firewall_aliases_edit.php +++ b/src/usr/local/www/firewall_aliases_edit.php @@ -601,10 +601,13 @@ $help = array( // Tab type specific patterns. // Intentionally loose (valid character check only, no pattern recognition). -// Can be tightend up with pattern recognition as desired for each tab type. +// Can be tightened up with pattern recognition as desired for each tab type. +// Network and host types allow an optional CIDR following the address or an address range using dash separator, +// and there may be multiple items separated by spaces - "192.168.1.0/24 192.168.2.4-192.168.2.19" +// On submit, strings like that are parsed and expanded into the appropriate individual entries and then validated. $pattern_str = array( - 'network' => '[a-zA-Z0-9_:.-]+', // Alias Name, Host Name, IP Address, FQDN, Network or IP Address Range - 'host' => '[a-zA-Z0-9_:.-]+', // Alias Name, Host Name, IP Address, FQDN + 'network' => '[a-zA-Z0-9_:.-]+(/[0-9]+)?( [a-zA-Z0-9_:.-]+(/[0-9]+)?)*', // Alias Name, Host Name, IP Address, FQDN, Network or IP Address Range + 'host' => '[a-zA-Z0-9_:.-]+(/[0-9]+)?( [a-zA-Z0-9_:.-]+(/[0-9]+)?)*', // Alias Name, Host Name, IP Address, FQDN 'port' => '[a-zA-Z0-9_:]+', // Alias Name, Port Number, or Port Number Range 'url' => '.*', // Alias Name or URL 'url_ports' => '.*', // Alias Name or URL |