Koha-clms/serials
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
..
acqui-search-result.pl Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
acqui-search.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
checkexpiration.pl Bug 29609: Centralized code to build the link to a biblio detail page 2022-04-08 15:49:16 +02:00
claims.pl Bug 30377: Fix two CGI::param called in list context-warnings 2022-04-04 16:23:46 +02:00
create-numberpattern.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
lateissues-export.pl Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-05 15:43:13 +01:00
reorder_members.pl Bug 20015: use Modern::Perl in Serials perl script 2018-02-05 09:46:45 -03:00
routing-preview.pl Bug 31318: Remove GetItemsInfo from serials/routing-preview 2022-08-16 09:27:15 -03:00
routing.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
serials-collection.pl Bug 29790: Restore warning if deletion of serial item fails 2022-01-11 12:38:35 -10:00
serials-edit.pl Bug 34146: Counterpart for serials-edit 2023-07-03 14:51:33 -03:00
serials-home.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
serials-search.pl Bug 31846: Add syspref for serials search results limit 2023-10-25 10:35:27 -03:00
showpredictionpattern.pl Bug 33901: (bug 30718 follow-up) Predition pattern - don't set end date to today 2023-06-09 08:41:53 -03:00
subscription-add.pl Bug 33039: Add ability to specify a template for serial subscription "Published on (text)" field 2023-07-14 08:59:43 -03:00
subscription-batchedit.pl Bug 37183: Batch edit serial subscriptions sets expiration date to today 2024-07-25 09:50:39 +02:00
subscription-bib-search.pl Bug 33803: Remove comment about tab width 2023-06-06 09:58:47 -03:00
subscription-detail.pl Bug 37247: Fix display of "closed" 2024-07-25 09:58:11 +02:00
subscription-frequencies.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
subscription-frequency.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
subscription-history.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
subscription-numberpattern.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
subscription-numberpatterns.pl Bug 28012: Use definedness test instead of bool when checking whether to null fields 2024-01-03 17:27:11 +01:00
subscription-renew.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
viewalerts.pl Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00