Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update
  • Loading branch information
peter-mw committed Apr 22, 2022
1 parent 3e47c4f commit ad3928f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/MicroweberPackages/App/Http/Controllers/ApiController.php
Expand Up @@ -611,18 +611,23 @@ public function module()
$request_data_new = [];
$antixss = new AntiXSS();
foreach ($request_data as $k=>$v){

if(is_string($v)) {
$v = str_replace('<', '-', $v);
$v = str_replace('>', '-', $v);
}
$v = $antixss->xss_clean($v);

if(is_string($k)){
$k = str_replace('<', '-', $k);
$k = str_replace('>', '-', $k);
$k = $antixss->xss_clean($k);
if($k){
$request_data_new[$k] = $v;
}
} else {
$request_data_new[$k] = $v;
}

}
$request_data = $request_data_new;
}
Expand Down

0 comments on commit ad3928f

Please sign in to comment.