[Web] Fix some transport verifications
This commit is contained in:
@@ -190,6 +190,9 @@ function transport($_action, $_data = null) {
|
||||
$active = intval($_data['active']);
|
||||
$lookup_mx = intval($_data['lookup_mx']);
|
||||
$nexthop = trim($_data['nexthop']);
|
||||
if (filter_var($nexthop, FILTER_VALIDATE_IP)) {
|
||||
$nexthop = '[' . $nexthop . ']';
|
||||
}
|
||||
preg_match('/\[(.+)\].*/', $nexthop, $next_hop_matches);
|
||||
$next_hop_clean = (isset($next_hop_matches[1])) ? $next_hop_matches[1] : $nexthop;
|
||||
$username = str_replace(':', '\:', trim($_data['username']));
|
||||
@@ -323,6 +326,9 @@ function transport($_action, $_data = null) {
|
||||
continue;
|
||||
}
|
||||
preg_match('/\[(.+)\].*/', $nexthop, $next_hop_matches);
|
||||
if (filter_var($nexthop, FILTER_VALIDATE_IP)) {
|
||||
$nexthop = '[' . $nexthop . ']';
|
||||
}
|
||||
$next_hop_clean = (isset($next_hop_matches[1])) ? $next_hop_matches[1] : $nexthop;
|
||||
$transports = transport('get');
|
||||
if (!empty($transports)) {
|
||||
|
Reference in New Issue
Block a user