From 007c700af146cba6f0c506ddfc9e0b90c0f8ed1e Mon Sep 17 00:00:00 2001 From: Filip Schauer Date: Mon, 17 Nov 2025 18:13:17 +0100 Subject: [PATCH] api: oci image pull: oci-registry-pull: fix incomplete reference regex Previously trying to pull an OCI image with a '-' character in its name failed because the regex did not match on it. This commit fixes this by basing the regex on the one used in 'query-oci-repo-tags'. Reported-by: Nicolas Frey Signed-off-by: Filip Schauer Link: https://lore.proxmox.com/20251117171528.262443-5-f.schauer@proxmox.com Signed-off-by: Thomas Lamprecht --- src/PVE/API2/Storage/Status.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/API2/Storage/Status.pm b/src/PVE/API2/Storage/Status.pm index 0dc97bb..6b657eb 100644 --- a/src/PVE/API2/Storage/Status.pm +++ b/src/PVE/API2/Storage/Status.pm @@ -931,7 +931,8 @@ __PACKAGE__->register_method({ pattern => '^(?:(?:[a-zA-Z\d]|[a-zA-Z\d][a-zA-Z\d-]*[a-zA-Z\d])' . '(?:\.(?:[a-zA-Z\d]|[a-zA-Z\d][a-zA-Z\d-]*[a-zA-Z\d]))*(?::\d+)?/)?[a-z\d]+' - . '(?:/[a-z\d]+(?:(?:(?:[._]|__|[-]*)[a-z\d]+)+)?)*:\w[\w.-]{0,127}$', + . '(?:(?:[._]|__|[-]*)[a-z\d]+)*(?:/[a-z\d]+(?:(?:[._]|__|[-]*)[a-z\d]+)*)*' + . ':\w[\w.-]{0,127}$', }, filename => { description =>