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: JesseM <jesse@bywatersolutions.com>
This commit is contained in:
David Cook 2025-02-20 00:04:39 +00:00 committed by JesseM
parent 7152b64f67
commit 7c32c490ea
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ if ( $mode eq 'job_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);