Corrected link forwarding check
This commit is contained in:
parent
168f4ece75
commit
6cfbc1f7ea
@ -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 = [
|
||||
|
Reference in New Issue
Block a user