Do proper XSS sanity check with excel files (#39)

This commit is contained in:
FrancescoUK
2016-05-26 18:41:59 +01:00
parent e4cb04fd3e
commit a5f63d1cc0
2 changed files with 2 additions and 12 deletions

View File

@@ -171,12 +171,7 @@ class Customers extends Person_controller
while (($data = fgetcsv($handle)) !== FALSE)
{
// XSS file data sanity check
if ($this->security->xss_clean($data) === FALSE)
{
echo json_encode( array('success'=>false, 'message'=>'Your uploaded file contains malicious data') );
return;
}
$data = $this->security->xss_clean($data);
$person_data = array(
'first_name'=>$data[0],

View File

@@ -578,12 +578,7 @@ class Items extends Secure_area implements iData_controller
while (($data = fgetcsv($handle)) !== FALSE)
{
// XSS file data sanity check
if ($this->security->xss_clean($data) === FALSE)
{
echo json_encode( array('success'=>false, 'message'=>'Your uploaded file contains malicious data') );
return;
}
$data = $this->security->xss_clean($data);
if (sizeof($data) >= 23)
{