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 <n.frey@proxmox.com> Signed-off-by: Filip Schauer <f.schauer@proxmox.com> Link: https://lore.proxmox.com/20251117171528.262443-5-f.schauer@proxmox.com Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
21584f8350
commit
007c700af1
@ -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 =>
|
||||
|
||||
Reference in New Issue
Block a user