[Web] Fix transport validation

master
andryyy 2021-08-17 22:07:06 +02:00
parent 82f4f1fd15
commit 913e9cbb11
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 2 additions and 2 deletions

View File

@ -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),