[Web] Save filter objects 1:1 to database
This commit is contained in:
parent
dd2986da4c
commit
53e8bf537b
@ -206,7 +206,7 @@ $tfa_data = get_tfa();
|
|||||||
<form class="form" data-id="rlyhost" role="form" method="post">
|
<form class="form" data-id="rlyhost" role="form" method="post">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="hostname"><?=$lang['admin']['host'];?></label>
|
<label for="hostname"><?=$lang['admin']['host'];?></label>
|
||||||
<input class="form-control input-sm" name="hostname" required>
|
<input class="form-control input-sm" name="hostname" placeholder='host:25, host, [host]:25, [0.0.0.0]:25' required>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="username"><?=$lang['admin']['username'];?></label>
|
<label for="username"><?=$lang['admin']['username'];?></label>
|
||||||
|
@ -42,7 +42,7 @@ function policy($_action, $_scope, $_data = null) {
|
|||||||
elseif ($_data['object_list'] == "wl") {
|
elseif ($_data['object_list'] == "wl") {
|
||||||
$object_list = "whitelist_from";
|
$object_list = "whitelist_from";
|
||||||
}
|
}
|
||||||
$object_from = preg_replace('/\.+/', '.', rtrim(preg_replace("/\.\*/", "*", trim(strtolower($_data['object_from']))), '.'));
|
$object_from = trim(strtolower($_data['object_from']));
|
||||||
if (!ctype_alnum(str_replace(array('@', '_', '.', '-', '*'), '', $object_from))) {
|
if (!ctype_alnum(str_replace(array('@', '_', '.', '-', '*'), '', $object_from))) {
|
||||||
$_SESSION['return'][] = array(
|
$_SESSION['return'][] = array(
|
||||||
'type' => 'danger',
|
'type' => 'danger',
|
||||||
@ -104,7 +104,7 @@ function policy($_action, $_scope, $_data = null) {
|
|||||||
elseif ($_data['object_list'] == "wl") {
|
elseif ($_data['object_list'] == "wl") {
|
||||||
$object_list = "whitelist_from";
|
$object_list = "whitelist_from";
|
||||||
}
|
}
|
||||||
$object_from = preg_replace('/\.+/', '.', rtrim(preg_replace("/\.\*/", "*", trim(strtolower($_data['object_from']))), '.'));
|
$object_from = trim(strtolower($_data['object_from']));
|
||||||
if (!ctype_alnum(str_replace(array('@', '_', '.', '-', '*'), '', $object_from))) {
|
if (!ctype_alnum(str_replace(array('@', '_', '.', '-', '*'), '', $object_from))) {
|
||||||
$_SESSION['return'][] = array(
|
$_SESSION['return'][] = array(
|
||||||
'type' => 'danger',
|
'type' => 'danger',
|
||||||
|
Loading…
Reference in New Issue
Block a user