schema: anchor regex for 'pve-storage-format'
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Acked-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
bba0b3ae46
commit
1b38ad0e27
@ -346,7 +346,7 @@ PVE::JSONSchema::register_format('pve-storage-format', \&verify_format);
|
||||
sub verify_format {
|
||||
my ($fmt, $noerr) = @_;
|
||||
|
||||
if ($fmt !~ m/(raw|qcow2|vmdk|subvol)/) {
|
||||
if ($fmt !~ m/^(raw|qcow2|vmdk|subvol)$/) {
|
||||
return undef if $noerr;
|
||||
die "invalid format '$fmt'\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user