Koha/reports
Pasi Kallinen ba5be802e0 Bug 24695: Improve SQL report validation
The saved SQL report code validates the SQL in multiple places:
when saving, when updating, and when executing the query.
Move the validation code into Koha::Reports, and write tests for it.

Test plan:
1) Apply patch
2) Create a new valid SQL report, save it (success)
3) Create a new illegal SQL report, try to save (fails)
4) Update already saved SQL report by adding one of
   the forbidden words, eg. delete or drop (saving will fail)
5) Edit a save_sql in the database, changing it to eg.
   "drop borrowers", and try to execute it (fails)
6) Prove t/db_dependent/Koha/Reports.t

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Work as described, no qa errors.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Bug 24695: (QA follow-up) Fix number of tests

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-12 15:27:50 +02:00
..
acquisitions_stats.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
bor_issues_top.pl Bug 27486: Rename system preference delimiter to CSVDelimiter 2021-01-29 09:03:45 +01:00
borrowers_out.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
borrowers_stats.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
cash_register_stats.pl Bug 27486: Rename system preference delimiter to CSVDelimiter 2021-01-29 09:03:45 +01:00
cat_issues_top.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
catalogue_out.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
catalogue_stats.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
dictionary.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
guided_reports.pl Bug 24695: Improve SQL report validation 2021-04-12 15:27:50 +02:00
issues_avg_stats.pl Bug 7806: Fix remaining occurrences of 0000-00-00 2021-03-01 11:16:42 +01:00
issues_stats.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
itemslost.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
itemtypes.plugin Bug 26090: Fix "item types" report 2020-08-18 14:38:41 +02:00
manager.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
orders_by_fund.pl Bug 27486: Rename system preference delimiter to CSVDelimiter 2021-01-29 09:03:45 +01:00
reports-home.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
reserves_stats.pl Bug 27673: (QA follow-up) Remove unused YAML::XS import 2021-02-16 14:54:50 +01:00
serials_stats.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00