Koha-clms/circ
Kyle M Hall 96152682bf 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: wainuiwitikapark <wainuiwitikapark@catalyst.net.nz>
2024-11-05 22:46:12 +00:00
..
add_message.pl Bug 21699: Allow circulation messages to be editable 2023-05-05 10:18:55 -03:00
article-request-slip.pl Bug 29771: Scalar context for split 2022-03-08 23:03:34 -10: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 25835: Include overdues with fines in overdues_report permission 2024-01-19 22:37:52 +00:00
branchtransfers.pl Bug 30409: barcodedecode() should always trim barcode 2022-06-14 07:54:58 -03:00
checkout-notes.pl Bug 29380: Correct table name in joins to prevent errors 2021-11-03 15:40:52 +01:00
circulation-home.pl Bug 33961: Remove built-in offline circ tool 2023-07-17 08:18:59 +01:00
circulation.pl Bug 36376: (QA follow-up) Tidy 2024-05-28 16:27:54 +00:00
curbside_pickups.pl Bug 32883: (QA follow-up) Adjust ordering for pickups 2023-03-27 11:49:33 +02:00
del_message.pl Bug 29903: Prevent messages to be deleted from unauthorised users 2022-02-02 21:05:29 -10:00
hold-transfer-slip.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +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-05 22:46:12 +00:00
pendingreserves.pl Bug 34972: (QA follow-up) Remove some ModReserveCancelAll imports 2024-05-23 14:13:19 +00:00
renew.pl Bug 31735: Avoid re-fetcing objects from database by passing them directly instead of ids to various subroutines 2023-05-12 12:40:21 -03:00
request-article.pl Bug 30094: Make the patron search from request-article.pl use the REST API 2022-04-04 09:47:00 +02:00
reserveratios.pl Bug 34938: (QA follow-up) Tidy code 2023-11-10 15:10:46 -10:00
returns.pl Bug 34972: Remove GetOtherReserves 2024-05-23 14:13:19 +00: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 Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
transfers_to_send.pl Bug 35388: Add comment to 'Transfers to send' 2024-05-13 14:42:57 +00:00
transferstoreceive.pl Bug 24295: Remove GetTransfers from circ/transferstoreceive.pl 2022-08-26 15:42:52 -03:00
view_holdsqueue.pl Bug 29015: Add options for itemtype, collection, and shelving location to view_holdsqueue.pl 2021-11-03 15:40:52 +01:00
waitingreserves.pl Bug 35003: Make cancelled hold requests filter by branch 2023-11-07 21:40:50 -10:00