From a1a8c1f353e05a55ff00c225763db06a2247a2d8 Mon Sep 17 00:00:00 2001
From: Owen Leonard
Date: Fri, 22 Nov 2019 16:47:45 +0000
Subject: [PATCH] Bug 13806: No input sanitization where creating Reports
subgroup
This patch adds validation of report group and subgroup inputs so that
the user can't enter data into only one half of the group code/name
pair.
To test, apply the patch and go to Reports -> Use saved.
- Create or edit a report which doesn't have a group or subgroup
assigned.
- Under "Report group," select the "or create" radio button.
- Click the "Update SQL" button to submit the form without entering a
group code or name. The form should require taht you enter data into
both fields.
- Enter data into the report group code and name fields. Add data to
either the code or data field under "Report subgroup." You should
not be able to submit the form without populating both.
- Start over editing a report which doesn't have a group or subgroup
assigned.
- Select an existing group under "Report group."
- Under "Report subgroup," select the "or create" option.
- You should not be able to submit the form without adding data in
both the code and name fields for the report subgroup.
---
.../en/modules/reports/guided_reports_start.tt | 80 ++++++++++++++++++----
1 file changed, 65 insertions(+), 15 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
index cac8ccbea4c..4ca5833a52e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
@@ -614,7 +614,7 @@ canned reports and writing custom SQL reports.
[% END %]
[% IF ( save ) %]
-