update get_request when an error occurs

Example to use to prevent XSS attack from get_request

get_request('cmd','REQUEST',false,null,true)
This commit is contained in:
Genaro Contreras Gutierrez 2019-07-30 08:44:10 -07:00 committed by GitHub
parent 25cbb26e1d
commit c22c98c463
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -675,7 +675,7 @@ function get_request($attr,$type='POST',$die=false,$default=null,$preventXSS=fal
system_message(array(
'title'=>_('Generic Error'),
'body'=>sprintf('%s: Called "%s" without "%s" using "%s"',
basename($_SERVER['PHP_SELF']),get_request('cmd','REQUEST'),preventXSS($attr),preventXSS($type)),
basename($_SERVER['PHP_SELF']),get_request('cmd','REQUEST',false,null,true),preventXSS($attr),preventXSS($type)),
'type'=>'error'),
'index.php');
if($preventXSS && !is_null($value))