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

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
David Cook 2025-02-20 00:04:39 +00:00 committed by Katrin Fischer
parent b439003fba
commit b504d8c5e9
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -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);