From e1c1533790a850bbbc12c158b5ec555970736349 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 2 Nov 2020 13:08:04 +0100 Subject: [PATCH] fix #3039: use the same ID regex for info and api in the api we use PROXMOX_SAFE_ID_REGEX for backup ids, but here (where we use it to list them) we use a local regex since the first is a superset of the one used here, simply extend the local one Signed-off-by: Dominik Csapak --- src/backup/backup_info.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backup/backup_info.rs b/src/backup/backup_info.rs index 3ace44dc..c5d245e9 100644 --- a/src/backup/backup_info.rs +++ b/src/backup/backup_info.rs @@ -9,7 +9,7 @@ use lazy_static::lazy_static; use super::manifest::MANIFEST_BLOB_NAME; -macro_rules! BACKUP_ID_RE { () => (r"[A-Za-z0-9][A-Za-z0-9_-]+") } +macro_rules! BACKUP_ID_RE { () => (r"[A-Za-z0-9_][A-Za-z0-9._\-]*") } macro_rules! BACKUP_TYPE_RE { () => (r"(?:host|vm|ct)") } macro_rules! BACKUP_TIME_RE { () => (r"[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z") }