diff --git a/src/Components/Action/Action.php b/src/Components/Action/Action.php index 994458d..f88c5fd 100644 --- a/src/Components/Action/Action.php +++ b/src/Components/Action/Action.php @@ -12,7 +12,7 @@ final class Action { // delay for server benchmark (new ServerBenchmarkDelay())->delay(); - $action = (string) filter_input(\INPUT_GET, 'action', \FILTER_DEFAULT); + $action = (string) filter_input(\INPUT_GET, 'action'); if ( !$action) { return; } diff --git a/src/Components/Nodes/NodesAction.php b/src/Components/Nodes/NodesAction.php index aeb40df..f674428 100644 --- a/src/Components/Nodes/NodesAction.php +++ b/src/Components/Nodes/NodesAction.php @@ -13,7 +13,7 @@ final class NodesAction if (NodesConstants::ID !== $action) { return; } - $nodeId = filter_input(\INPUT_GET, 'nodeId', \FILTER_DEFAULT); + $nodeId = filter_input(\INPUT_GET, 'nodeId'); $response = new RestResponse(); if ( !$nodeId) { $response @@ -41,7 +41,7 @@ final class NodesAction } $isDev = \defined('XPROBER_IS_DEV') && XPROBER_IS_DEV; $url = $node['url']; - $isRemote = ( !str_contains($url, 'localhost') || !str_contains($url, '127.0.0.1')); + $isRemote = (false === strpos($url, 'localhost') && false === strpos($url, '127.0.0.1')); $params = 'action=poll'; $url = ($isDev && !$isRemote) ? "{$url}/api?{$params}" : "{$url}?{$params}";