summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiBa-NL <pba_2k3@yahoo.com>2016-09-02 00:59:52 +0200
committerRenato Botelho <renato@netgate.com>2016-09-02 08:34:46 -0300
commita7272e31613a7799f0d768708ab3a926a6b2a4da (patch)
treeaaac7127466326133519f41836c40bc6d219bcce
parentbfe658f6537de1cf0fe12beefa24dd2c59c3d5bd (diff)
downloadpfsense-a7272e31613a7799f0d768708ab3a926a6b2a4da.zip
pfsense-a7272e31613a7799f0d768708ab3a926a6b2a4da.tar.gz
Input boxes with setPattern validation should not contain escape characters as they are already properly considered 'lists of characters' even when not escaped.
(cherry picked from commit 8ea3fd0569ac2b1681de5ba3fbc2a2cc20981ad6)
-rw-r--r--src/usr/local/www/firewall_nat_1to1_edit.php4
-rw-r--r--src/usr/local/www/firewall_nat_out_edit.php4
-rw-r--r--src/usr/local/www/firewall_rules_edit.php2
-rw-r--r--src/usr/local/www/services_igmpproxy_edit.php2
-rw-r--r--src/usr/local/www/services_router_advertisements.php2
-rw-r--r--src/usr/local/www/services_unbound_domainoverride_edit.php2
6 files changed, 8 insertions, 8 deletions
diff --git a/src/usr/local/www/firewall_nat_1to1_edit.php b/src/usr/local/www/firewall_nat_1to1_edit.php
index aa25ff4..b0f1d02 100644
--- a/src/usr/local/www/firewall_nat_1to1_edit.php
+++ b/src/usr/local/www/firewall_nat_1to1_edit.php
@@ -471,7 +471,7 @@ $group->add(new Form_IpAddress(
'src',
null,
is_specialnet($pconfig['src']) ? '': $pconfig['src']
-))->addMask('srcmask', $pconfig['srcmask'], 31)->setHelp('Address/mask')->setPattern('[a-zA-Z0-9\.\:\_]+');
+))->addMask('srcmask', $pconfig['srcmask'], 31)->setHelp('Address/mask')->setPattern('[a-zA-Z0-9.:_]+');
$group->setHelp('Enter the internal (LAN) subnet for the 1:1 mapping. ' .
'The subnet size specified for the internal subnet will be applied to the external subnet.');
@@ -498,7 +498,7 @@ $group->add(new Form_IpAddress(
'dst',
null,
is_specialnet($pconfig['dst']) ? '': $pconfig['dst']
-))->addMask('dstmask', $pconfig['dstmask'], 31)->setHelp('Address/mask')->setPattern('[a-zA-Z0-9\.\:\_]+');
+))->addMask('dstmask', $pconfig['dstmask'], 31)->setHelp('Address/mask')->setPattern('[a-zA-Z0-9.:_]+');
$group->setHelp('The 1:1 mapping will only be used for connections to or from the specified destination. Hint: this is usually "Any".');
diff --git a/src/usr/local/www/firewall_nat_out_edit.php b/src/usr/local/www/firewall_nat_out_edit.php
index 6b5d076..1fc3a62 100644
--- a/src/usr/local/www/firewall_nat_out_edit.php
+++ b/src/usr/local/www/firewall_nat_out_edit.php
@@ -516,7 +516,7 @@ $group->add(new Form_IpAddress(
'source',
null,
$pconfig['source']
-))->addMask('source_subnet', $pconfig['source_subnet'])->setHelp('Source network for the outbound NAT mapping.')->setPattern('[a-zA-Z0-9\_\.\:]+');
+))->addMask('source_subnet', $pconfig['source_subnet'])->setHelp('Source network for the outbound NAT mapping.')->setPattern('[a-zA-Z0-9_.:]+');
$group->add(new Form_Input(
'sourceport',
@@ -540,7 +540,7 @@ $group->add(new Form_IpAddress(
'destination',
null,
$pconfig['destination'] == "any" ? "":$pconfig['destination']
-))->addMask('destination_subnet', $pconfig['destination_subnet'])->setHelp('Destination network for the outbound NAT mapping.')->setPattern('[a-zA-Z0-9\_\.\:]+');
+))->addMask('destination_subnet', $pconfig['destination_subnet'])->setHelp('Destination network for the outbound NAT mapping.')->setPattern('[a-zA-Z0-9_.:]+');
$group->add(new Form_Input(
'dstport',
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index d1f1858..7a4862e 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -1355,7 +1355,7 @@ foreach (['src' => 'Source', 'dst' => 'Destination'] as $type => $name) {
$type,
$name .' Address',
$pconfig[$type]
- ))->addMask($type .'mask', $pconfig[$type.'mask'])->setPattern('[a-zA-Z0-9\_\.\:]+');
+ ))->addMask($type .'mask', $pconfig[$type.'mask'])->setPattern('[a-zA-Z0-9_.:]+');
$section->add($group);
diff --git a/src/usr/local/www/services_igmpproxy_edit.php b/src/usr/local/www/services_igmpproxy_edit.php
index 44628a7..3513369 100644
--- a/src/usr/local/www/services_igmpproxy_edit.php
+++ b/src/usr/local/www/services_igmpproxy_edit.php
@@ -256,7 +256,7 @@ foreach ($item as $ww) {
null,
$address,
['placeholder' => 'Address']
- ))->sethelp($tracker == $rows ? 'Network/CIDR':null)->addMask('address_subnet' . $tracker, $address_subnet)->setWidth(4)->setPattern('[a-zA-Z0-9\_\.\:]+');
+ ))->sethelp($tracker == $rows ? 'Network/CIDR':null)->addMask('address_subnet' . $tracker, $address_subnet)->setWidth(4)->setPattern('[a-zA-Z0-9_.:]+');
$group->add(new Form_Button(
'deleterow' . $counter,
diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php
index 5cd5c7c..bd031e2 100644
--- a/src/usr/local/www/services_router_advertisements.php
+++ b/src/usr/local/www/services_router_advertisements.php
@@ -468,7 +468,7 @@ for ($idx=1; $idx<=3; $idx++) {
'radns' . $idx,
'Server ' . $idx,
$pconfig['radns' . $idx]
- ))->setPattern('[a-zA-Z0-9\_\.\:]+')->setHelp(($idx < 3) ? '':'Leave blank to use the system default DNS servers - this interface\'s IP if DNS Forwarder or Resolver is enabled, otherwise the servers configured on the General page');
+ ))->setPattern('[a-zA-Z0-9_.:]+')->setHelp(($idx < 3) ? '':'Leave blank to use the system default DNS servers - this interface\'s IP if DNS Forwarder or Resolver is enabled, otherwise the servers configured on the General page');
}
$section->addInput(new Form_Input(
diff --git a/src/usr/local/www/services_unbound_domainoverride_edit.php b/src/usr/local/www/services_unbound_domainoverride_edit.php
index 36be9af..76d25e7 100644
--- a/src/usr/local/www/services_unbound_domainoverride_edit.php
+++ b/src/usr/local/www/services_unbound_domainoverride_edit.php
@@ -165,7 +165,7 @@ $section->addInput(new Form_IpAddress(
'IP Address',
$pconfig['ip']
))->setHelp('IP address of the authoritative DNS server for this domain. e.g.: 192.168.100.100' . '<br />' .
- 'To use a non-default port for communication, append an \'@\' with the port number.')->setPattern('[a-zA-Z0-9\@\.\:]+');
+ 'To use a non-default port for communication, append an \'@\' with the port number.')->setPattern('[a-zA-Z0-9@.:]+');
$section->addInput(new Form_Input(
'descr',
OpenPOWER on IntegriCloud