From 5d6550d166480e2d4d683c82416f547934ca492a Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 20 Feb 2025 00:04:39 +0000 Subject: [PATCH] Bug 39170: Improve validation of report ID This change improves the validation of the report ID passed by the user. Test plan: 0. Apply the patch 1. koha-plack --restart kohadev 2. Create a SQL report 3. Go to /cgi-bin/koha/tools/scheduler.pl 4. Add in a Time, Date, and Email 5. Choose your report from the list 6. Click "Save" 7. Note that your report is saved --- tools/scheduler.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/scheduler.pl b/tools/scheduler.pl index 3a7b03915d..9801f1a2d8 100755 --- a/tools/scheduler.pl +++ b/tools/scheduler.pl @@ -60,7 +60,7 @@ if ( $op eq 'cud-add' ) { my $starttime = $input->param('starttime'); $starttime =~ s/\://g; my $start = $startdate . $starttime; - my $report = $input->param('report'); + my $report = int($input->param('report')); if ($report) { my $saved_report; my $report_id = int($report); -- 2.39.5