diff --git a/index.php b/index.php index 935c9b4..9b8f66c 100644 --- a/index.php +++ b/index.php @@ -8,10 +8,10 @@ case "go": if ( isset ( $request [ 1 ] ) ) { $link_id = $request [ 1 ]; - $link_id = (int) $link_id; - if ( ! is_int ( $link_id ) ) { + if ( ! ctype_digit ( $link_id ) ) { die ( "You can't be forwarded to a non numerical URL link ID. If you think this is incorrect, please send an email to shorte@dev.bryanpedini.it with this URL: https://sh.bjphoster.com/?go=" . $link_id . " for more investigations" ); } + $link_id = (int) $link_id; $db_connection = db_connect ( ); $statement = db_prepare ( $db_connection, "SELECT links.URL FROM links WHERE links.ID = ?" ); $parameters = [