public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Commit
[Web] Save filter objects 1:1 to database
53e8bf53
data/web/admin.php | 2 +-
data/web/inc/functions.policy.inc.php | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Diff
diff --git a/data/web/admin.php b/data/web/admin.php
index e203f0d7..31085b7b 100644
--- a/data/web/admin.php
+++ b/data/web/admin.php
@@ -206,7 +206,7 @@ $tfa_data = get_tfa();
<form class="form" data-id="rlyhost" role="form" method="post">
<div class="form-group">
<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 class="form-group">
<label for="username"><?=$lang['admin']['username'];?></label>
diff --git a/data/web/inc/functions.policy.inc.php b/data/web/inc/functions.policy.inc.php
index 12aacdd5..114e266b 100644
--- a/data/web/inc/functions.policy.inc.php
+++ b/data/web/inc/functions.policy.inc.php
@@ -42,7 +42,7 @@ function policy($_action, $_scope, $_data = null) {
elseif ($_data['object_list'] == "wl") {
$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))) {
$_SESSION['return'][] = array(
'type' => 'danger',
@@ -104,7 +104,7 @@ function policy($_action, $_scope, $_data = null) {
elseif ($_data['object_list'] == "wl") {
$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))) {
$_SESSION['return'][] = array(
'type' => 'danger',