mirror of
https://github.com/itflow-org/itflow
synced 2026-08-15 12:05:11 +00:00
Neutralize CSV formula injection in generated exports using the new created escapeCsvFormula Function
This commit is contained in:
@@ -639,7 +639,7 @@ if (isset($_POST['export_client_recurring_invoice_csv'])) {
|
||||
//output each row of the data, format line as csv and write to file pointer
|
||||
while($row = $sql->fetch_assoc()) {
|
||||
$lineData = array($row['recurring_invoice_prefix'] . $row['recurring_invoice_number'], $row['recurring_invoice_scope'], $row['recurring_invoice_amount'], ucwords($row['recurring_invoice_frequency'] . "ly"), $row['recurring_invoice_created_at']);
|
||||
fputcsv($f, $lineData, $delimiter);
|
||||
fputcsv($f, array_map('escapeCsvFormula', $lineData), $delimiter);
|
||||
}
|
||||
|
||||
//move back to beginning of file
|
||||
|
||||
Reference in New Issue
Block a user