Aug 26, 2019 02:01 AM
(This post was last modified: Aug 26, 2019 02:06 AM by ipkdanny.)
I've been racking my head trying to find some sort of vulnerability with this code snippet.
The idea is that a function is specified in query string parameters and is retrieved through $_REQUEST (the $a array in this case), and then executed with the array contents as the paramter. I've been going through the standard PHP functions but the fact that an array is being passed to the function makes this difficult and tricky.
Can anybody think of a vulnerability here, or is this code practically safe?
Edit: Woops...just realized this is in the SQLi section. My bad, but I blame the misleading breadcrumbs on Hack Forums - SQL Injection Attacks 🤫
The idea is that a function is specified in query string parameters and is retrieved through $_REQUEST (the $a array in this case), and then executed with the array contents as the paramter. I've been going through the standard PHP functions but the fact that an array is being passed to the function makes this difficult and tricky.
PHP Code
<?php
// someArg=value&model=function_to_call
$a = array(
'someArg' => 'value',
'model' => 'function_to_call');
$model = $a['model'];
$model($a);
?>Can anybody think of a vulnerability here, or is this code practically safe?
Edit: Woops...just realized this is in the SQLi section. My bad, but I blame the misleading breadcrumbs on Hack Forums - SQL Injection Attacks 🤫

