mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
src: whitespace sweep
This commit is contained in:
parent
61a809b48b
commit
966f6cee46
@ -48,11 +48,11 @@ database = $dir/index.txt # database index file.
|
||||
# several ctificates with same subject.
|
||||
new_certs_dir = $dir/newcerts # default place for new certs.
|
||||
|
||||
certificate = $dir/cacert.pem # The CA certificate
|
||||
serial = $dir/serial # The current serial number
|
||||
certificate = $dir/cacert.pem # The CA certificate
|
||||
serial = $dir/serial # The current serial number
|
||||
crlnumber = $dir/crlnumber # the current crl number
|
||||
# must be commented out to leave a V1 CRL
|
||||
crl = $dir/crl.pem # The current CRL
|
||||
crl = $dir/crl.pem # The current CRL
|
||||
private_key = $dir/private/cakey.pem# The private key
|
||||
RANDFILE = $dir/private/.rand # private random number file
|
||||
|
||||
@ -60,8 +60,8 @@ x509_extensions = usr_cert # The extentions to add to the cert
|
||||
|
||||
# Comment out the following two lines for the "traditional"
|
||||
# (and highly broken) format.
|
||||
name_opt = ca_default # Subject Name options
|
||||
cert_opt = ca_default # Certificate field options
|
||||
name_opt = ca_default # Subject Name options
|
||||
cert_opt = ca_default # Certificate field options
|
||||
|
||||
# Extension copying option: use with caution.
|
||||
# copy_extensions = copy
|
||||
@ -105,7 +105,7 @@ emailAddress = optional
|
||||
####################################################################
|
||||
[ req ]
|
||||
default_bits = 1024
|
||||
default_keyfile = privkey.pem
|
||||
default_keyfile = privkey.pem
|
||||
distinguished_name = req_distinguished_name
|
||||
attributes = req_attributes
|
||||
x509_extensions = v3_ca # The extentions to add to the self signed cert
|
||||
@ -331,7 +331,7 @@ default_tsa = tsa_config1 # the default TSA section
|
||||
dir = ./demoCA # TSA root directory
|
||||
serial = $dir/tsaserial # The current serial number (mandatory)
|
||||
crypto_device = builtin # OpenSSL engine to use for signing
|
||||
signer_cert = $dir/tsacert.pem # The TSA signing certificate
|
||||
signer_cert = $dir/tsacert.pem # The TSA signing certificate
|
||||
# (optional)
|
||||
certs = $dir/cacert.pem # Certificate chain to include in reply
|
||||
# (optional)
|
||||
|
||||
@ -8,4 +8,4 @@
|
||||
<pattern>api/ids/*</pattern>
|
||||
</patterns>
|
||||
</page-services-ids>
|
||||
</acl>
|
||||
</acl>
|
||||
|
||||
@ -93,49 +93,49 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
if (isset($_POST['id']) && isset($a_aliases[$_POST['id']])) {
|
||||
// perform validation
|
||||
/* make sure rule is not being referenced by any nat or filter rules */
|
||||
$is_alias_referenced = false;
|
||||
$referenced_by = false;
|
||||
$alias_name = $a_aliases[$_POST['id']]['name'];
|
||||
// Firewall rules
|
||||
find_alias_reference(array('filter', 'rule'), array('source', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('filter', 'rule'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('filter', 'rule'), array('source', 'port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('filter', 'rule'), array('destination', 'port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// NAT Rules
|
||||
find_alias_reference(array('nat', 'rule'), array('source', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'rule'), array('source', 'port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'rule'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'rule'), array('destination', 'port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'rule'), array('target'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'rule'), array('local-port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// NAT 1:1 Rules
|
||||
//find_alias_reference(array('nat', 'onetoone'), array('external'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
//find_alias_reference(array('nat', 'onetoone'), array('source', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'onetoone'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// NAT Outbound Rules
|
||||
find_alias_reference(array('nat', 'advancedoutbound', 'rule'), array('source', 'network'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'advancedoutbound', 'rule'), array('sourceport'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'advancedoutbound', 'rule'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'advancedoutbound', 'rule'), array('dstport'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'advancedoutbound', 'rule'), array('target'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// Alias in an alias
|
||||
find_alias_reference(array('aliases', 'alias'), array('address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// Load Balancer
|
||||
find_alias_reference(array('load_balancer', 'lbpool'), array('port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('load_balancer', 'virtual_server'), array('port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// Static routes
|
||||
find_alias_reference(array('staticroutes', 'route'), array('network'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
if($is_alias_referenced) {
|
||||
$savemsg = sprintf(gettext("Cannot delete alias. Currently in use by %s"), $referenced_by);
|
||||
} else {
|
||||
unset($a_aliases[$_POST['id']]);
|
||||
if (write_config()) {
|
||||
filter_configure();
|
||||
mark_subsystem_dirty('aliases');
|
||||
}
|
||||
$is_alias_referenced = false;
|
||||
$referenced_by = false;
|
||||
$alias_name = $a_aliases[$_POST['id']]['name'];
|
||||
// Firewall rules
|
||||
find_alias_reference(array('filter', 'rule'), array('source', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('filter', 'rule'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('filter', 'rule'), array('source', 'port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('filter', 'rule'), array('destination', 'port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// NAT Rules
|
||||
find_alias_reference(array('nat', 'rule'), array('source', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'rule'), array('source', 'port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'rule'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'rule'), array('destination', 'port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'rule'), array('target'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'rule'), array('local-port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// NAT 1:1 Rules
|
||||
//find_alias_reference(array('nat', 'onetoone'), array('external'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
//find_alias_reference(array('nat', 'onetoone'), array('source', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'onetoone'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// NAT Outbound Rules
|
||||
find_alias_reference(array('nat', 'advancedoutbound', 'rule'), array('source', 'network'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'advancedoutbound', 'rule'), array('sourceport'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'advancedoutbound', 'rule'), array('destination', 'address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'advancedoutbound', 'rule'), array('dstport'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('nat', 'advancedoutbound', 'rule'), array('target'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// Alias in an alias
|
||||
find_alias_reference(array('aliases', 'alias'), array('address'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// Load Balancer
|
||||
find_alias_reference(array('load_balancer', 'lbpool'), array('port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
find_alias_reference(array('load_balancer', 'virtual_server'), array('port'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
// Static routes
|
||||
find_alias_reference(array('staticroutes', 'route'), array('network'), $alias_name, $is_alias_referenced, $referenced_by);
|
||||
if($is_alias_referenced) {
|
||||
$savemsg = sprintf(gettext("Cannot delete alias. Currently in use by %s"), $referenced_by);
|
||||
} else {
|
||||
unset($a_aliases[$_POST['id']]);
|
||||
if (write_config()) {
|
||||
filter_configure();
|
||||
mark_subsystem_dirty('aliases');
|
||||
}
|
||||
header("Location: firewall_aliases.php?tab=" . $selected_tab);
|
||||
exit;
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -308,16 +308,16 @@ include("head.inc");
|
||||
<section class="page-content-main">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
|
||||
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
|
||||
<div id="inputerrors"></div>
|
||||
<section class="col-xs-12">
|
||||
<div class="content-box">
|
||||
<header class="content-box-head container-fluid">
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Alias Edit");?></h3>
|
||||
</header>
|
||||
<div class="content-box-main">
|
||||
<div class="content-box-main">
|
||||
<form action="firewall_aliases_edit.php" method="post" name="iform" id="iform">
|
||||
<div class="table-responsive">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
@ -385,10 +385,10 @@ include("head.inc");
|
||||
<input type="text" class="form-control" name="detail[]" value="<?= isset($detail_desc[$aliasid])?$detail_desc[$aliasid]:"";?>"?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($aliasid ==0):
|
||||
<?php if ($aliasid ==0):
|
||||
?>
|
||||
<input type="text" class="form-control input-sm" id="updatefreq" name="updatefreq" value="<?=$pconfig['updatefreq'];?>" >
|
||||
<?php endif;
|
||||
<?php endif;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -410,15 +410,15 @@ include("head.inc");
|
||||
<input type="text" class="form-control" name="detail[]" value="<?= isset($detail_desc[$addressid])?$detail_desc[$addressid]:"";?>"?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($addressid ==0):
|
||||
<?php if ($addressid ==0):
|
||||
?>
|
||||
<input type="text" class="form-control input-sm" id="updatefreq" name="updatefreq" value="<?=$pconfig['updatefreq'];?>" >
|
||||
<?php endif;
|
||||
<?php endif;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach;
|
||||
<?php endforeach;
|
||||
endif;
|
||||
?>
|
||||
</tbody>
|
||||
|
||||
@ -154,8 +154,8 @@ include("head.inc");
|
||||
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
|
||||
<section class="col-xs-12">
|
||||
<div class="content-box">
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Alias Import");?></h3>
|
||||
<header class="content-box-head container-fluid">
|
||||
<h3><?=gettext("Alias Import");?></h3>
|
||||
</header>
|
||||
<div class="content-box-main">
|
||||
<form action="firewall_aliases_import.php" method="post" name="iform">
|
||||
|
||||
@ -81,42 +81,42 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$id = $pconfig['id'];
|
||||
}
|
||||
if (isset($pconfig['apply'])) {
|
||||
write_config();
|
||||
filter_configure();
|
||||
$savemsg = get_std_save_message();
|
||||
clear_subsystem_dirty('natconf');
|
||||
clear_subsystem_dirty('filter');
|
||||
} elseif (isset($pconfig['act']) && $pconfig['act'] == 'del' && isset($id)) {
|
||||
write_config();
|
||||
filter_configure();
|
||||
$savemsg = get_std_save_message();
|
||||
clear_subsystem_dirty('natconf');
|
||||
clear_subsystem_dirty('filter');
|
||||
} elseif (isset($pconfig['act']) && $pconfig['act'] == 'del' && isset($id)) {
|
||||
// delete nat rule and associated rule if it exists
|
||||
if (isset($a_nat[$id]['associated-rule-id'])) {
|
||||
delete_id($a_nat[$id]['associated-rule-id'], $config['filter']['rule']);
|
||||
mark_subsystem_dirty('filter');
|
||||
}
|
||||
unset($a_nat[$id]);
|
||||
delete_id($a_nat[$id]['associated-rule-id'], $config['filter']['rule']);
|
||||
mark_subsystem_dirty('filter');
|
||||
}
|
||||
unset($a_nat[$id]);
|
||||
|
||||
if (write_config()) {
|
||||
mark_subsystem_dirty('natconf');
|
||||
}
|
||||
header("Location: firewall_nat.php");
|
||||
exit;
|
||||
} elseif (isset($pconfig['act']) && $pconfig['act'] == 'del_x' && isset($pconfig['rule']) && count($pconfig['rule']) > 0) {
|
||||
if (write_config()) {
|
||||
mark_subsystem_dirty('natconf');
|
||||
}
|
||||
header("Location: firewall_nat.php");
|
||||
exit;
|
||||
} elseif (isset($pconfig['act']) && $pconfig['act'] == 'del_x' && isset($pconfig['rule']) && count($pconfig['rule']) > 0) {
|
||||
/* delete selected rules */
|
||||
foreach ($pconfig['rule'] as $rulei) {
|
||||
if (isset($a_nat[$rulei])) {
|
||||
$target = $rule['target'];
|
||||
// Check for filter rule associations
|
||||
if (isset($a_nat[$rulei]['associated-rule-id'])){
|
||||
// Check for filter rule associations
|
||||
if (isset($a_nat[$rulei]['associated-rule-id'])){
|
||||
delete_id($a_nat[$rulei]['associated-rule-id'], $config['filter']['rule']);
|
||||
mark_subsystem_dirty('filter');
|
||||
}
|
||||
unset($a_nat[$rulei]);
|
||||
unset($a_nat[$rulei]);
|
||||
}
|
||||
}
|
||||
if (write_config()) {
|
||||
}
|
||||
if (write_config()) {
|
||||
mark_subsystem_dirty('natconf');
|
||||
}
|
||||
header("Location: firewall_nat.php");
|
||||
exit;
|
||||
header("Location: firewall_nat.php");
|
||||
exit;
|
||||
} elseif ( isset($pconfig['act']) && $pconfig['act'] == 'move') {
|
||||
// move records
|
||||
if (isset($pconfig['rule']) && count($pconfig['rule']) > 0) {
|
||||
@ -183,41 +183,41 @@ $( document ).ready(function() {
|
||||
if (id != 'x') {
|
||||
// delete single
|
||||
BootstrapDialog.show({
|
||||
type:BootstrapDialog.TYPE_INFO,
|
||||
title: "<?= gettext("Port Forward");?>",
|
||||
message: "<?=gettext("Do you really want to delete this rule?");?>",
|
||||
buttons: [{
|
||||
type:BootstrapDialog.TYPE_INFO,
|
||||
title: "<?= gettext("Port Forward");?>",
|
||||
message: "<?=gettext("Do you really want to delete this rule?");?>",
|
||||
buttons: [{
|
||||
label: "<?= gettext("No");?>",
|
||||
action: function(dialogRef) {
|
||||
dialogRef.close();
|
||||
}}, {
|
||||
label: "<?= gettext("Yes");?>",
|
||||
action: function(dialogRef) {
|
||||
$("#id").val(id);
|
||||
label: "<?= gettext("Yes");?>",
|
||||
action: function(dialogRef) {
|
||||
$("#id").val(id);
|
||||
$("#action").val("del");
|
||||
$("#iform").submit()
|
||||
}
|
||||
$("#iform").submit()
|
||||
}
|
||||
}]
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// delete selected
|
||||
BootstrapDialog.show({
|
||||
type:BootstrapDialog.TYPE_INFO,
|
||||
title: "<?= gettext("Port Forward");?>",
|
||||
message: "<?=gettext("Do you really want to delete the selected rules?");?>",
|
||||
buttons: [{
|
||||
type:BootstrapDialog.TYPE_INFO,
|
||||
title: "<?= gettext("Port Forward");?>",
|
||||
message: "<?=gettext("Do you really want to delete the selected rules?");?>",
|
||||
buttons: [{
|
||||
label: "<?= gettext("No");?>",
|
||||
action: function(dialogRef) {
|
||||
dialogRef.close();
|
||||
}}, {
|
||||
label: "<?= gettext("Yes");?>",
|
||||
action: function(dialogRef) {
|
||||
$("#id").val("");
|
||||
label: "<?= gettext("Yes");?>",
|
||||
action: function(dialogRef) {
|
||||
$("#id").val("");
|
||||
$("#action").val("del_x");
|
||||
$("#iform").submit()
|
||||
}
|
||||
$("#iform").submit()
|
||||
}
|
||||
}]
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -276,7 +276,7 @@ $( document ).ready(function() {
|
||||
<th><?=gettext("Ports");?></th>
|
||||
<th><?=gettext("Description");?></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (isset($config['interfaces']['lan'])) {
|
||||
@ -330,7 +330,7 @@ $( document ).ready(function() {
|
||||
<? else:?>
|
||||
<span class="glyphicon glyphicon-play text-success"></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</td>
|
||||
<td>
|
||||
<?=htmlspecialchars(convert_friendly_interface_to_friendly_descr(isset($natent['interface']) ? $natent['interface'] : "wan"));?>
|
||||
</td>
|
||||
@ -380,7 +380,7 @@ $( document ).ready(function() {
|
||||
<?php if (is_alias(pprint_port($localport))): ?>
|
||||
<a href="/firewall_aliases_edit.php?name=<?=htmlspecialchars(pprint_port($localport));?>"><i class="fa fa-list"></i> </a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</td>
|
||||
<td>
|
||||
<?=$natent['descr'];?>
|
||||
</td>
|
||||
@ -398,7 +398,7 @@ $( document ).ready(function() {
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php $nnats++; endforeach; ?>
|
||||
<tr>
|
||||
<td colspan="8"></td>
|
||||
@ -414,7 +414,7 @@ $( document ).ready(function() {
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if (count($a_nat) == 0): ?>
|
||||
<span class="btn btn-default btn-xs text-muted" data-toggle="tooltip" data-placement="left" title="<?=gettext("delete selected rules");?>"><span class="glyphicon glyphicon-remove" ></span></span>
|
||||
<span class="btn btn-default btn-xs text-muted" data-toggle="tooltip" data-placement="left" title="<?=gettext("delete selected rules");?>"><span class="glyphicon glyphicon-remove" ></span></span>
|
||||
<?php else: ?>
|
||||
<a id="del_x" title="<?=gettext("delete selected rules"); ?>" data-toggle="tooltip" class="act_delete btn btn-default btn-xs">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
@ -423,9 +423,9 @@ $( document ).ready(function() {
|
||||
<a href="firewall_nat_edit.php?after=-1" class="btn btn-default btn-xs" data-toggle="tooltip" data-placement="left" title="<?=gettext("add new rule");?>">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="13"> </td>
|
||||
|
||||
@ -553,13 +553,13 @@ $( document ).ready(function() {
|
||||
<td>
|
||||
<div class="input-group">
|
||||
<select id="proto" name="protocol" class="selectpicker" data-live-search="true" data-size="5" data-width="auto">
|
||||
<?php foreach (explode(" ", "TCP UDP TCP/UDP ICMP ESP AH GRE IPV6 IGMP PIM OSPF") as $proto):
|
||||
<?php foreach (explode(" ", "TCP UDP TCP/UDP ICMP ESP AH GRE IPV6 IGMP PIM OSPF") as $proto):
|
||||
?>
|
||||
<option value="<?=strtolower($proto);?>" <?= strtolower($proto) == $pconfig['protocol'] ? "selected=\"selected\"" : ""; ?>>
|
||||
<option value="<?=strtolower($proto);?>" <?= strtolower($proto) == $pconfig['protocol'] ? "selected=\"selected\"" : ""; ?>>
|
||||
<?=$proto;?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="hidden" for="help_for_proto">
|
||||
<?=gettext("Choose which IP protocol " ."this rule should match."); ?><br/>
|
||||
@ -594,13 +594,13 @@ $( document ).ready(function() {
|
||||
<select name="src" id="src" class="selectpicker" data-live-search="true" data-size="5" data-width="auto">
|
||||
<option data-other=true value="<?=$pconfig['src'];?>" <?=!is_specialnet($pconfig['src']) ? "selected=\"selected\"" : "";?>><?=gettext("Single host or Network"); ?></option>
|
||||
<optgroup label="<?=gettext("aliasses");?>">
|
||||
<?php foreach (legacy_list_aliasses("network") as $alias):
|
||||
<?php foreach (legacy_list_aliasses("network") as $alias):
|
||||
?>
|
||||
<option value="<?=$alias['name'];?>" <?=$alias['name'] == $pconfig['src'] ? "selected=\"selected\"" : "";?>><?=htmlspecialchars($alias['name']);?></option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<optgroup label="<?=gettext("net");?>">
|
||||
<?php foreach (formNetworks() as $ifent => $ifdesc):
|
||||
<?php foreach (formNetworks() as $ifent => $ifdesc):
|
||||
?>
|
||||
<option value="<?=$ifent;?>" <?= $pconfig['src'] == $ifent ? "selected=\"selected\"" : ""; ?>><?=$ifdesc;?></option>
|
||||
<?php endforeach; ?>
|
||||
@ -640,7 +640,7 @@ $( document ).ready(function() {
|
||||
<select id="srcbeginport" name="srcbeginport" class="selectpicker" data-live-search="true" data-size="5" data-width="auto">
|
||||
<option data-other=true value="<?=$pconfig['srcbeginport'];?>">(<?=gettext("other"); ?>)</option>
|
||||
<optgroup label="<?=gettext("aliasses");?>">
|
||||
<?php foreach (legacy_list_aliasses("port") as $alias):
|
||||
<?php foreach (legacy_list_aliasses("port") as $alias):
|
||||
?>
|
||||
<option value="<?=$alias['name'];?>" <?= $pconfig['srcbeginport'] == $alias['name'] ? "selected=\"selected\"" : ""; ?> ><?=htmlspecialchars($alias['name']);?> </option>
|
||||
<?php endforeach; ?>
|
||||
@ -657,7 +657,7 @@ $( document ).ready(function() {
|
||||
<select id="srcendport" name="srcendport" class="selectpicker" data-live-search="true" data-size="5" data-width="auto">
|
||||
<option data-other=true value="<?=$pconfig['srcendport'];?>">(<?=gettext("other"); ?>)</option>
|
||||
<optgroup label="<?=gettext("aliasses");?>">
|
||||
<?php foreach (legacy_list_aliasses("port") as $alias):
|
||||
<?php foreach (legacy_list_aliasses("port") as $alias):
|
||||
?>
|
||||
<option value="<?=$alias['name'];?>" <?= $pconfig['srcendport'] == $alias['name'] ? "selected=\"selected\"" : ""; ?> ><?=htmlspecialchars($alias['name']);?> </option>
|
||||
<?php endforeach; ?>
|
||||
@ -708,13 +708,13 @@ $( document ).ready(function() {
|
||||
<select name="dst" id="dst" class="selectpicker" data-live-search="true" data-size="5" data-width="auto">
|
||||
<option data-other=true value="<?=$pconfig['dst'];?>" <?=!is_specialnet($pconfig['dst']) ? "selected=\"selected\"" : "";?>><?=gettext("Single host or Network"); ?></option>
|
||||
<optgroup label="<?=gettext("aliasses");?>">
|
||||
<?php foreach (legacy_list_aliasses("network") as $alias):
|
||||
<?php foreach (legacy_list_aliasses("network") as $alias):
|
||||
?>
|
||||
<option value="<?=$alias['name'];?>" <?=$alias['name'] == $pconfig['dst'] ? "selected=\"selected\"" : "";?>><?=htmlspecialchars($alias['name']);?></option>
|
||||
<?php endforeach; ?>
|
||||
</optgroup>
|
||||
<optgroup label="<?=gettext("net");?>">
|
||||
<?php foreach (formNetworks() as $ifent => $ifdesc):
|
||||
<?php foreach (formNetworks() as $ifent => $ifdesc):
|
||||
?>
|
||||
<option value="<?=$ifent;?>" <?= $pconfig['dst'] == $ifent ? "selected=\"selected\"" : ""; ?>><?=$ifdesc;?></option>
|
||||
<?php endforeach; ?>
|
||||
@ -754,7 +754,7 @@ $( document ).ready(function() {
|
||||
<select id="dstbeginport" name="dstbeginport" class="selectpicker" data-live-search="true" data-size="5" data-width="auto">
|
||||
<option data-other=true value="<?=$pconfig['dstbeginport'];?>">(<?=gettext("other"); ?>)</option>
|
||||
<optgroup label="<?=gettext("aliasses");?>">
|
||||
<?php foreach (legacy_list_aliasses("port") as $alias):
|
||||
<?php foreach (legacy_list_aliasses("port") as $alias):
|
||||
?>
|
||||
<option value="<?=$alias['name'];?>" <?= $pconfig['dstbeginport'] == $alias['name'] ? "selected=\"selected\"" : ""; ?> ><?=htmlspecialchars($alias['name']);?> </option>
|
||||
<?php endforeach; ?>
|
||||
@ -771,7 +771,7 @@ $( document ).ready(function() {
|
||||
<select id="dstendport" name="dstendport" class="selectpicker" data-live-search="true" data-size="5" data-width="auto">
|
||||
<option data-other=true value="<?=$pconfig['dstendport'];?>">(<?=gettext("other"); ?>)</option>
|
||||
<optgroup label="<?=gettext("aliasses");?>">
|
||||
<?php foreach (legacy_list_aliasses("port") as $alias):
|
||||
<?php foreach (legacy_list_aliasses("port") as $alias):
|
||||
?>
|
||||
<option value="<?=$alias['name'];?>" <?= $pconfig['dstendport'] == $alias['name'] ? "selected=\"selected\"" : ""; ?> ><?=htmlspecialchars($alias['name']);?> </option>
|
||||
<?php endforeach; ?>
|
||||
@ -821,7 +821,7 @@ $( document ).ready(function() {
|
||||
<select id="localbeginport" name="local-port" class="selectpicker" data-live-search="true" data-size="5" data-width="auto">
|
||||
<option data-other=true value="<?=$pconfig['local-port'];?>">(<?=gettext("other"); ?>)</option>
|
||||
<optgroup label="<?=gettext("aliasses");?>">
|
||||
<?php foreach (legacy_list_aliasses("port") as $alias):
|
||||
<?php foreach (legacy_list_aliasses("port") as $alias):
|
||||
?>
|
||||
<option value="<?=$alias['name'];?>" <?= $pconfig['local-port'] == $alias['name'] ? "selected=\"selected\"" : ""; ?> ><?=htmlspecialchars($alias['name']);?> </option>
|
||||
<?php endforeach; ?>
|
||||
@ -856,7 +856,7 @@ $( document ).ready(function() {
|
||||
<td>
|
||||
<input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" />
|
||||
<div class="hidden" for="help_for_descr">
|
||||
<?=gettext("You may enter a description here " ."for your reference (not parsed)."); ?>
|
||||
<?=gettext("You may enter a description here " ."for your reference (not parsed)."); ?>
|
||||
</div>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -879,7 +879,7 @@ $( document ).ready(function() {
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if (isset($id) && (!isset($_GET['dup']) || !is_numericint($_GET['dup']))): ?>
|
||||
<?php if (isset($id) && (!isset($_GET['dup']) || !is_numericint($_GET['dup']))): ?>
|
||||
<tr class="act_no_rdr">
|
||||
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Filter rule association"); ?></td>
|
||||
<td>
|
||||
@ -910,7 +910,7 @@ $( document ).ready(function() {
|
||||
<a href="firewall_rules_edit.php?id=<?=$linkedrule;?>"> <?=gettext("View the filter rule");?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php elseif (!isset($id) || (isset($_GET['dup']) && is_numericint($_GET['dup']))) :
|
||||
<?php elseif (!isset($id) || (isset($_GET['dup']) && is_numericint($_GET['dup']))) :
|
||||
?>
|
||||
<tr class="act_no_rdr">
|
||||
<td><a id="help_for_fra" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Filter rule association"); ?></td>
|
||||
@ -926,7 +926,7 @@ $( document ).ready(function() {
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;
|
||||
<?php endif;
|
||||
|
||||
$has_created_time = (isset($pconfig['created']) && is_array($pconfig['created']));
|
||||
$has_updated_time = (isset($pconfig['updated']) && is_array($pconfig['updated']));
|
||||
@ -939,14 +939,14 @@ $( document ).ready(function() {
|
||||
<tr>
|
||||
<td colspan="2"><?=gettext("Rule Information");?></td>
|
||||
</tr>
|
||||
<?php if ($has_created_time): ?>
|
||||
<?php if ($has_created_time): ?>
|
||||
<tr>
|
||||
<td><?=gettext("Created");?></td>
|
||||
<td>
|
||||
<?= date(gettext("n/j/y H:i:s"), $pconfig['created']['time']) ?> <?= gettext("by") ?> <strong><?=$pconfig['created']['username'];?></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;
|
||||
<?php endif;
|
||||
if ($has_updated_time):
|
||||
?>
|
||||
<tr>
|
||||
@ -955,7 +955,7 @@ $( document ).ready(function() {
|
||||
<?= date(gettext("n/j/y H:i:s"), $pconfig['updated']['time']) ?> <?= gettext("by") ?> <strong><?=$pconfig['updated']['username'];?></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;
|
||||
<?php endif;
|
||||
endif;
|
||||
?>
|
||||
<tr>
|
||||
|
||||
@ -163,7 +163,7 @@ function do_input_validation($postdata, $reqdfields, $reqdfieldsn, &$input_error
|
||||
for ($i = 0; $i < count($reqdfields); $i++) {
|
||||
// why.. do you want to do this? we send data to validate and then validate something else....
|
||||
// can't now for sure if any page uses this wrong behaviour, but it should die eventually.
|
||||
// TODO: kill
|
||||
// TODO: kill
|
||||
if (empty($_POST[$reqdfields[$i]]) && empty($_REQUEST[$reqdfields[$i]])) {
|
||||
$input_errors[] = sprintf(gettext("The field %s is required."), $reqdfieldsn[$i]);
|
||||
}
|
||||
@ -475,7 +475,7 @@ function address_to_pconfig($adr, &$padr, &$pmask, &$pnot, &$pbeginport, &$pendp
|
||||
else
|
||||
$pmask = 32;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (isset($adr['not']))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user