fix #6516: api: backup jobs: limit the job ID length on creation

All backup job API calls that take an existing job ID use the
'pve-backup-jobid' option, which is limited to 50 characters. The
create call uses its own 'id' parameter without that limit, so a longer
ID can be created, but the job can then neither be read, updated nor
deleted through the API or the web UI, and has to be removed from
jobs.cfg by hand.

Apply the same limit when creating the job.

Signed-off-by: Michal Fox <me@dualfroz.com>
This commit is contained in:
dualfroz committed 2026-09-25 11:31:04 +02:00
1 parent bc569c5258
commit 4dfc7eb30c
1 file changed
+1
+1
View File
@@ -259,6 +259,7 @@ __PACKAGE__->register_method({
type => 'string', type => 'string',
description => "Job ID (will be autogenerated).", description => "Job ID (will be autogenerated).",
format => 'pve-configid', format => 'pve-configid',
maxLength => 50,
optional => 1, # FIXME: make required on 8.0 optional => 1, # FIXME: make required on 8.0
}, },
schedule => { schedule => {