From c22c98c463b81cb51cc0ba460db5ca712939a3f0 Mon Sep 17 00:00:00 2001 From: Genaro Contreras Gutierrez Date: Tue, 30 Jul 2019 08:44:10 -0700 Subject: [PATCH] update get_request when an error occurs Example to use to prevent XSS attack from get_request get_request('cmd','REQUEST',false,null,true) --- lib/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions.php b/lib/functions.php index e698f42..1f1e48c 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -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))