mirror of
https://github.com/itflow-org/itflow
synced 2026-08-16 04:25:13 +00:00
Neutralize CSV formula injection in generated exports using the new created escapeCsvFormula Function
This commit is contained in:
@@ -274,7 +274,7 @@ if (isset($_POST['export_products_csv'])) {
|
||||
//output each row of the data, format line as csv and write to file pointer
|
||||
while($row = mysqli_fetch_assoc($sql)) {
|
||||
$lineData = array($row['product_name'], $row['product_description'], $row['product_price'], $row['product_currency_code'], $row['category_name'], $row['tax_name']);
|
||||
fputcsv($f, $lineData, $delimiter, $enclosure, $escape);
|
||||
fputcsv($f, array_map('escapeCsvFormula', $lineData), $delimiter, $enclosure, $escape);
|
||||
}
|
||||
|
||||
//move back to beginning of file
|
||||
|
||||
Reference in New Issue
Block a user