From 747d791e051d6f839f8cbaeb7c07086401db0c4b Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 18 Oct 2023 17:44:08 +0300 Subject: [PATCH] fix port validation to 5 digits max --- src/public/peer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/public/peer.php b/src/public/peer.php index 0521739..790c107 100644 --- a/src/public/peer.php +++ b/src/public/peer.php @@ -39,7 +39,7 @@ $requestSort = isset($_GET['sort']) && in_array($_GET['sort'], ['peerConnect $requestOrder = isset($_GET['order']) && in_array($_GET['order'], ['ASC', 'DESC']) ? $_GET['order'] : 'DESC'; $requestPage = isset($_GET['page']) && $_GET['page'] > 1 ? (int) $_GET['page'] : 1; $requestCalendar = isset($_GET['calendar']) && in_array($_GET['calendar'], ['traffic']) ? $_GET['calendar'] : 'traffic'; -$requestPort = isset($_POST['port']) && 5 > strlen($_POST['port']) && $_POST['port'] > 0 ? (int) $_POST['port'] : false; +$requestPort = isset($_POST['port']) && 6 > strlen($_POST['port']) && $_POST['port'] > 0 ? (int) $_POST['port'] : false; // App controller begin $calendar = new Yggverse\Graph\Calendar\Month($requestTime);