mirror of
https://github.com/itflow-org/itflow
synced 2026-08-05 07:07:14 +00:00
Neutralize CSV formula injection in generated exports using the new created escapeCsvFormula Function
This commit is contained in:
@@ -2586,7 +2586,7 @@ if (isset($_POST['export_tickets_csv'])) {
|
||||
//output each row of the data, format line as csv and write to file pointer
|
||||
while ($row = $sql->fetch_assoc()) {
|
||||
$lineData = array($config_ticket_prefix . $row['ticket_number'], $row['ticket_priority'], $row['ticket_status_name'], $row['ticket_subject'], $row['ticket_created_at'], $row['ticket_resolved_at'], $row['ticket_closed_at']);
|
||||
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