diff options
author | Phil Davis <phil.davis@inf.org> | 2016-05-06 11:35:51 +0930 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2016-05-06 11:35:51 +0930 |
commit | aa3890c75ef104597664b1ba1d2d326aaa1e25f7 (patch) | |
tree | a90cabf7966ffd18885c4805bd8ecfc1c7751f2f /src/usr/local/www/firewall_aliases_edit.php | |
parent | ecf8ef6434252f81b7979d2d8f7705b513d6c66f (diff) | |
download | pfsense-aa3890c75ef104597664b1ba1d2d326aaa1e25f7.zip pfsense-aa3890c75ef104597664b1ba1d2d326aaa1e25f7.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/local/www/firewall_aliases_edit.php')
-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 |