[pve-devel] [PATCH storage 4/4] api: storage status: oci-registry-pull: fix incomplete reference regex
Filip Schauer
f.schauer at proxmox.com
Mon Nov 17 18:13:17 CET 2025
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 <n.frey at proxmox.com>
Signed-off-by: Filip Schauer <f.schauer at proxmox.com>
---
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 16436a3..c29a991 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 =>
--
2.47.3
More information about the pve-devel
mailing list