Koha-clms/circ
Kyle M Hall c9ffc538de Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files
The system is vulnerable to Formula Injection attacks as the data
stored within the database and exported as CSV/Excel is not being
sanitized or validated against implanted formula payloads

This patch modifies all uses of Text::CSV and derived classes to pass
the "formula" parameter with value of "empty" which replaces formulas
by empty string.

Test Plan:
1) Apply this patch
2) For guided_reports.pl, attempt to export CSV where you've set a column to a formula somehow
   ( such as "=1+3" )
3) Export that CSV file
4) Note the formula has not been exported
5) Repeat this plan for the remaining scripts that export CSV files
   where users can define the outputted data

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Fixed two conflicts. I have tested that this works as advertised on:
- Reports (Download > Comma separated text (.csv)) [Text::CSV::Encoded]
- Circulation > Overdues > Download file of all overdues [Text::CSV_XS]
- misc/export_borrowers.pl [Text::CSV]
This covers all modules used, and both GUI and command line.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Change none to empty in the commit message ! None is the default,
doing nothing. Empty clears the formulas.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e588f810a521065bf46dc037edeac5c83d537714)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-11-05 15:43:13 +01:00
..
add_message.pl Bug 21699: Allow circulation messages to be editable 2023-05-05 10:18:55 -03:00
article-request-slip.pl
…
article-requests.pl
…
bookcount.pl Bug 33149: Use template wrapper for breadcrumbs: Circulation part 1 2023-04-06 09:29:26 -03:00
branchoverdues.pl Bug 25835: Include overdues with fines in overdues_report permission 2024-01-15 15:17:43 +01:00
branchtransfers.pl Bug 30409: barcodedecode() should always trim barcode 2022-06-14 07:54:58 -03:00
checkout-notes.pl
…
circulation-home.pl Bug 33961: Remove built-in offline circ tool 2023-06-12 16:53:25 -03:00
circulation.pl Bug 36376: (QA follow-up) Tidy 2024-05-23 11:14:20 +02:00
curbside_pickups.pl Bug 32883: (QA follow-up) Adjust ordering for pickups 2023-03-27 11:49:33 +02:00
del_message.pl
…
hold-transfer-slip.pl
…
on-site_checkouts.pl
…
overdue.pl Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-05 15:43:13 +01:00
pendingreserves.pl Bug 34972: (QA follow-up) Remove some ModReserveCancelAll imports 2024-05-22 14:44:24 +02:00
renew.pl Bug 33444: Update AddRenewal to take a hashref of params 2023-07-19 12:06:52 -03:00
request-article.pl Bug 34519: Add a template plugin for fetch searchable patron attributes 2023-11-08 17:52:37 -03:00
reserveratios.pl Bug 34938: (QA follow-up) Tidy code 2023-11-08 11:41:32 -03:00
returns.pl Bug 37400 - In returns.pl don't search for a patron unless needed 2024-09-10 15:34:19 +02:00
set-library.pl Bug 30624: (QA follow-up) Use C4:Context to get permissions 2023-03-13 15:23:20 -03:00
transfer-slip.pl
…
transfers_to_send.pl Bug 35388: Add comment to 'Transfers to send' 2024-03-21 12:03:27 +01:00
transferstoreceive.pl Bug 24295: Remove GetTransfers from circ/transferstoreceive.pl 2022-08-26 15:42:52 -03:00
view_holdsqueue.pl Bug 28966: Prefetch patron data for holds queue viewer 2023-07-25 16:25:38 -03:00
waitingreserves.pl Bug 35003: Make cancelled hold requests filter by branch 2023-10-27 16:54:06 -03:00