Merge branch 'ent-7081-snmp-wizard-con-muchas-interfaces-da-error-de-php' into 'develop'

POST/GET reloaded if empty in ajax

See merge request artica/pandorafms!3867
This commit is contained in:
Daniel Rodriguez 2021-03-18 09:59:55 +00:00
commit de175ec755
1 changed files with 10 additions and 0 deletions

View File

@ -64,6 +64,16 @@ if (isset($config['console_log_enabled']) === true
ini_set('error_log', 0);
}
// 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];
}
}
// Hash login process.
if (isset($_GET['loginhash']) === true) {
$loginhash_data = get_parameter('loginhash_data', '');