mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-16 04:50:09 -04:00
Do proper XSS sanity check with excel files (#39)
This commit is contained in:
@@ -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],
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user