Avoid certain cirumstances while retrieving parameters API

This commit is contained in:
fbsanchez 2021-07-08 21:08:13 +02:00
parent 3d5ae6887c
commit 98e9f8344f
1 changed files with 10 additions and 0 deletions

View File

@ -49,6 +49,16 @@ enterprise_include_once('include/functions_metaconsole.php');
$ipOrigin = $_SERVER['REMOTE_ADDR']; $ipOrigin = $_SERVER['REMOTE_ADDR'];
// Sometimes input is badly retrieved from caller...
if (empty($_REQUEST) === true) {
$data = explode('&', urldecode(file_get_contents('php://input')));
foreach ($data as $d) {
$r = explode('=', $d, 2);
$_POST[$r[0]] = $r[1];
$_GET[$r[0]] = $r[1];
}
}
// Get the parameters and parse if necesary. // Get the parameters and parse if necesary.
$op = get_parameter('op'); $op = get_parameter('op');
$op2 = get_parameter('op2'); $op2 = get_parameter('op2');