Corrected link forwarding check
This commit is contained in:
parent
168f4ece75
commit
6cfbc1f7ea
@ -8,10 +8,10 @@
|
|||||||
case "go":
|
case "go":
|
||||||
if ( isset ( $request [ 1 ] ) ) {
|
if ( isset ( $request [ 1 ] ) ) {
|
||||||
$link_id = $request [ 1 ];
|
$link_id = $request [ 1 ];
|
||||||
$link_id = (int) $link_id;
|
if ( ! ctype_digit ( $link_id ) ) {
|
||||||
if ( ! is_int ( $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" );
|
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 ( );
|
$db_connection = db_connect ( );
|
||||||
$statement = db_prepare ( $db_connection, "SELECT links.URL FROM links WHERE links.ID = ?" );
|
$statement = db_prepare ( $db_connection, "SELECT links.URL FROM links WHERE links.ID = ?" );
|
||||||
$parameters = [
|
$parameters = [
|
||||||
|
Reference in New Issue
Block a user