3 ms·
PHP Library Remote Code Execution
- lioeters 4y agoThe culprit is a horrific piece of code from 2010. if (!function_exists('json_decode')) { function json_decode($json,$to_array=false) { $x=false; if (!empty($json) && strpos($json,'{"')!==false) { $out = '$x='.str_replace(array('{','":','}'),array('array(','"=>',')'),$json); eval($out.';'); if (!$to_array) $x = (object) $x; } return $x; } //end function json_decode }