summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2011-05-25 19:42:48 -0400
committerScott Ullrich <sullrich@pfsense.org>2011-05-25 19:43:51 -0400
commitd65962a7736ae9917182007f4ee0862193fc910f (patch)
treede515187848b3ebba4451006fb8b3564e7563866 /usr/local/www
parent838e4eb8762a000509cf98e3bd5e2a2cceac06ff (diff)
downloadpfsense-d65962a7736ae9917182007f4ee0862193fc910f.zip
pfsense-d65962a7736ae9917182007f4ee0862193fc910f.tar.gz
Adding a new hook system for firewall nat edit and firewall rules edit page.
Basically if the directory exists it will suck in the files to extend these pags. /usr/local/pkg/firewall_nat/input_validation /usr/local/pkg/firewall_nat/pre_write_config /usr/local/pkg/firewall_nat/htmlphpearly /usr/local/pkg/firewall_nat/htmlphplate /usr/local/pkg/firewall_rules/input_validation /usr/local/pkg/firewall_rules/pre_write_config /usr/local/pkg/firewall_rules/htmlphpearly /usr/local/pkg/firewall_rules/htmlphplate
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/firewall_nat_edit.php15
-rwxr-xr-xusr/local/www/firewall_rules_edit.php15
2 files changed, 30 insertions, 0 deletions
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php
index 3dc1d83..9895312 100755
--- a/usr/local/www/firewall_nat_edit.php
+++ b/usr/local/www/firewall_nat_edit.php
@@ -290,6 +290,9 @@ if ($_POST) {
}
}
+ // Allow extending of the nat edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/input_validation");
+
if (!$input_errors) {
$natent = array();
@@ -422,6 +425,9 @@ if ($_POST) {
mark_subsystem_dirty('natconf');
+ // Allow extending of the nat edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_write_config");
+
write_config();
header("Location: firewall_nat.php");
@@ -440,6 +446,11 @@ include("fbegin.inc"); ?>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<form action="firewall_nat_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
+<?php
+ // Allow extending of the nat edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/htmlphpearly");
+?>
+
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Redirect entry"); ?></td>
</tr>
@@ -817,6 +828,10 @@ include("fbegin.inc"); ?>
</select>
</td>
</tr><?php endif; ?>
+<?php
+ // Allow extending of the nat edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/htmlphplate");
+?>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">&nbsp;</td>
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index c051518..d673df8 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -401,6 +401,9 @@ if ($_POST) {
$input_errors[] = gettext("If you specify TCP flags that should be set you should specify out of which flags as well.");
}
+ // Allow extending of the firewall edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/input_validation");
+
if (!$input_errors) {
$filterent = array();
$filterent['id'] = $_POST['ruleid']>0?$_POST['ruleid']:'';
@@ -554,6 +557,10 @@ if ($_POST) {
}
filter_rules_sort();
+
+ // Allow extending of the firewall edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/pre_write_config");
+
write_config();
mark_subsystem_dirty('filter');
@@ -596,6 +603,10 @@ include("head.inc");
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Edit Firewall rule");?></td>
</tr>
+<?php
+ // Allow extending of the firewall edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/htmlphpearly");
+?>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Action");?></td>
<td width="78%" class="vtable">
@@ -1381,6 +1392,10 @@ include("head.inc");
</div>
</td>
</tr>
+<?php
+ // Allow extending of the firewall edit page and include custom input validation
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_rules/htmlphplate");
+?>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
OpenPOWER on IntegriCloud