* [PATCH manager 0/2] fix #6516: limit the backup job ID length on creation
@ 2026-09-26 7:29 Michal Fox
2026-09-26 7:29 ` [PATCH manager 1/2] fix #6516: api: backup jobs: limit the " Michal Fox
2026-09-26 7:29 ` [PATCH manager 2/2] fix #6516: ui: backup job: limit the job ID length Michal Fox
0 siblings, 2 replies; 3+ messages in thread
From: Michal Fox @ 2026-09-26 7:29 UTC (permalink / raw)
To: pve-devel
creating a backup job did not check the 50 character limit that every
other backup job API call enforces, so a job with a longer ID could be
created but then neither be edited nor removed (#6516). the first patch
adds the limit to the create call, the second one marks a longer ID as
invalid in the edit window already.
tested by validating the create parameters against the API schema in a
container: 51 characters are now rejected, 50 still work, and in a
browser with the built pvemanagerlib.js the Job ID field shows the
maximum length error.
Michal Fox (2):
fix #6516: api: backup jobs: limit the job ID length on creation
fix #6516: ui: backup job: limit the job ID length
PVE/API2/Backup.pm | 1 +
www/manager6/panel/BackupAdvancedOptions.js | 1 +
2 files changed, 2 insertions(+)
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH manager 1/2] fix #6516: api: backup jobs: limit the job ID length on creation
2026-09-26 7:29 [PATCH manager 0/2] fix #6516: limit the backup job ID length on creation Michal Fox
@ 2026-09-26 7:29 ` Michal Fox
2026-09-26 7:29 ` [PATCH manager 2/2] fix #6516: ui: backup job: limit the job ID length Michal Fox
1 sibling, 0 replies; 3+ messages in thread
From: Michal Fox @ 2026-09-26 7:29 UTC (permalink / raw)
To: pve-devel
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>
---
PVE/API2/Backup.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/PVE/API2/Backup.pm b/PVE/API2/Backup.pm
index 3bd85593..a890c1fa 100644
--- a/PVE/API2/Backup.pm
+++ b/PVE/API2/Backup.pm
@@ -259,6 +259,7 @@ __PACKAGE__->register_method({
type => 'string',
description => "Job ID (will be autogenerated).",
format => 'pve-configid',
+ maxLength => 50,
optional => 1, # FIXME: make required on 8.0
},
schedule => {
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH manager 2/2] fix #6516: ui: backup job: limit the job ID length
2026-09-26 7:29 [PATCH manager 0/2] fix #6516: limit the backup job ID length on creation Michal Fox
2026-09-26 7:29 ` [PATCH manager 1/2] fix #6516: api: backup jobs: limit the " Michal Fox
@ 2026-09-26 7:29 ` Michal Fox
1 sibling, 0 replies; 3+ messages in thread
From: Michal Fox @ 2026-09-26 7:29 UTC (permalink / raw)
To: pve-devel
The API only allows backup job IDs of up to 50 characters, so mark
longer values as invalid in the edit window already, instead of failing
on submit.
Signed-off-by: Michal Fox <me@dualfroz.com>
---
www/manager6/panel/BackupAdvancedOptions.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/www/manager6/panel/BackupAdvancedOptions.js b/www/manager6/panel/BackupAdvancedOptions.js
index fe8cc3bf..54a995dd 100644
--- a/www/manager6/panel/BackupAdvancedOptions.js
+++ b/www/manager6/panel/BackupAdvancedOptions.js
@@ -122,6 +122,7 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
startColumn: {
xtype: 'pmxDisplayEditField',
vtype: 'ConfigId',
+ maxLength: 50,
fieldLabel: gettext('Job ID'),
emptyText: gettext('Autogenerate'),
name: 'id',
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-28 7:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-26 7:29 [PATCH manager 0/2] fix #6516: limit the backup job ID length on creation Michal Fox
2026-09-26 7:29 ` [PATCH manager 1/2] fix #6516: api: backup jobs: limit the " Michal Fox
2026-09-26 7:29 ` [PATCH manager 2/2] fix #6516: ui: backup job: limit the job ID length Michal Fox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox