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] Fix transport validation
913e9cbb
data/web/inc/functions.transports.inc.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Diff
diff --git a/data/web/inc/functions.transports.inc.php b/data/web/inc/functions.transports.inc.php
index 7b229175..05ad25d8 100644
--- a/data/web/inc/functions.transports.inc.php
+++ b/data/web/inc/functions.transports.inc.php
@@ -262,7 +262,7 @@ function transport($_action, $_data = null) {
$destinations = array_filter(array_values(array_unique($destinations)));
if (empty($destinations)) { return false; }
if (isset($next_hop_matches[1])) {
- if (in_array($next_hop_clean, $existing_nh)) {
+ if ($existing_nh !== null && in_array($next_hop_clean, $existing_nh)) {
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
@@ -379,7 +379,7 @@ function transport($_action, $_data = null) {
return false;
}
if (isset($next_hop_matches[1])) {
- if (in_array($next_hop_clean, $existing_nh)) {
+ if ($existing_nh !== null && in_array($next_hop_clean, $existing_nh)) {
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),