Koha-clms/circ
Kyle M Hall 3d03eff4a4 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>
2024-11-07 23:02:54 +00:00
..
add_message.pl Bug 29393: (QA follow-up) Tidy add_message.pl 2024-04-29 17:38:01 +02:00
article-request-slip.pl Bug 33478: Apply formatting to AR_SLIP 2024-04-26 20:15:46 +02:00
article-requests.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
bookcount.pl Bug 33149: Use template wrapper for breadcrumbs: Circulation part 1 2023-04-06 09:29:26 -03:00
branchoverdues.pl Bug 34478: op =~ ^cud- in pl/pm - Manual cud-email => email 2024-03-01 10:57:14 +01:00
branchtransfers.pl Bug 25682: Style transfers interface to match checkin page 2024-04-29 18:53:07 +02:00
checkout-notes.pl Bug 34478: Rename action with op - circ/checkout-notes 2024-03-01 10:56:39 +01:00
circulation-home.pl Bug 33961: Remove built-in offline circ tool 2023-06-12 16:53:25 -03:00
circulation.pl Bug 27753: (QA follow-up) Use librarian as resolver 2024-05-06 09:12:14 +02:00
curbside_pickups.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
del_message.pl Bug 34478: Manual fix - add op and change link to form - members-toolbar.inc / patron_messages.inc 2024-03-01 10:57:26 +01:00
hold-transfer-slip.pl Bug 33478: Apply formatting to HOLD_SLIP 2024-04-26 20:15:41 +02:00
on-site_checkouts.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
overdue.pl Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-07 23:02:54 +00:00
pendingreserves.pl Bug 34972: (QA follow-up) Remove some ModReserveCancelAll imports 2024-05-07 15:53:43 +02:00
renew.pl Bug 34478: Add 'op' to circ/renew.pl 2024-03-01 10:58:48 +01:00
request-article.pl Bug 34478: Rename action with op - circ/request-article 2024-03-01 10:56:39 +01:00
reserveratios.pl Bug 23208: Add ability to set a default hold ratio value 2024-03-25 09:53:22 +01:00
returns.pl Bug 37400 - In returns.pl don't search for a patron unless needed 2024-08-28 20:04:16 +00:00
set-library.pl Bug 36572: Fix and clean-up set library 2024-04-12 11:25:59 +02:00
transfer-slip.pl Bug 33478: Apply formatting to TRANSFERSLIP 2024-04-26 20:15:42 +02:00
transfers_to_send.pl Bug 35388: Add comment to 'Transfers to send' 2024-03-19 18:09:07 +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 34478: Manual fix - add ops / change confirmation forms to get - waiting_holds.inc / waitingreserves.tt 2024-03-01 10:57:25 +01:00